public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ipc: Further updates to sysv/mqueue limits
@ 2014-05-29 18:46 Manfred Spraul
  2014-05-29 18:46 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
  2014-05-31  5:20 ` [PATCH 0/3] ipc: Further updates to sysv/mqueue limits Michael Kerrisk (man-pages)
  0 siblings, 2 replies; 8+ messages in thread
From: Manfred Spraul @ 2014-05-29 18:46 UTC (permalink / raw)
  To: Davidlohr Bueso, Michael Kerrisk, Rafael Aquini, Rik van Riel
  Cc: LKML, 1vier1, Manfred Spraul

Hi all,

a) If we increase SHMMAX/SHMALL, then it makes sense to
   increase MSGMNI, too.
   And: This allows to remove the automatic scaling (~300 lines)

b) We can also increase SEMMSL, SEMMNI and SEMOPM

c) I think it would make more sense if a namespace starts with the
   limits from it's parent:
   If an admin set the limits, then he probably wants that these limits also
   apply for a new child namespace.

All patches are RFC - they compile, but that's it.

TODO:
- check if the sysv sem limits are sane.
  Especially the SEMOPM - if real users exist that pass > 1k ops, then
  switch from kmalloc to vmalloc.

  @the Redhat developers: Do you have any idea where this "often
  recommended" comes from?
  https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/sect-Oracle_9i_and_10g_Tuning_Guide-Setting_Semaphores-The_SEMOPM_Parameter.html

- copy Davidlohrs explanation for the sysv shm limits to sysv msg and
  sysv sem.

- check if we should also increase the limits for posix mqueue

- decide if it would make sense to increase IPCMNI:

  Right now, it is 32768. This means that after 65536 pairs of
  semget()/semctl(IPC_RMID), semget() will return the same identifier
  again - and a semop(old_id) won't return -EINVAL, instead it will
  access the "new" array, which is probably now what the caller
  intended to do.

  The split is arbitrary - we could also split it 1048576/2048 or any
  other split we want.

- test everything.

--
	Manfred

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/3] ipc: Further updates to sysv/mqueue limits
@ 2014-08-12  7:29 Manfred Spraul
  0 siblings, 0 replies; 8+ messages in thread
From: Manfred Spraul @ 2014-08-12  7:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: LKML, Davidlohr Bueso, Michael Kerrisk, Rafael Aquini,
	Rik van Riel, 1vier1, Manfred Spraul

Hi Andrew,

I got some positive and no negative feedback on my patches, thus:
Could you add the patches to -mm and push them towards Linus?

0001-ipc-msg-increase-MSGMNI-remove-scaling.patch
	- increase MSGMNI to 32000
	- as a bonus, this removes around 300 lines

0002-ipc-sem.c-increase-SEMMSL-SEMMNI-SEMOPM.patch
	- increase all limits
	- update the documentation, it was stale

   Note: Redhat/Oracle recommend values that exceed what I would recommend
   as safe upper limits.
 
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/sect-Oracle_9i_and_10g_Tuning_Guide-Setting_Semaphores-An_Example_of_Semaphore_Settings.html 

   Unfortunately I didn't get any replies, thus I don't know how to proceed.

   One option would be to switch from kmalloc to ipc_alloc, then the risk of
   failing due to memory fragmentation would be resolved.

0003-ipc-namespace-copy-settings-from-parent-namespace.patch
	Change the namespace code so that a new namespace inherits the values
	from it's parent instead of the boot time defaults.

	Serge Hallyn and Michael Kerrisk also consider the new approach as better.
	One thing that is a bit surprising is that clone(CLONE_NEWIPC)k

I've tested the changes both with unshare -i and with my own test apps.
Unfortunately I didn't manage to get lxc to run on my busybox test setup :-(

--
	Manfred

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-08-12  7:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29 18:46 [PATCH 0/3] ipc: Further updates to sysv/mqueue limits Manfred Spraul
2014-05-29 18:46 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
2014-05-29 18:46   ` [PATCH 2/3] ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM Manfred Spraul
2014-05-29 18:46     ` [PATCH 3/3] ipc namespace: copy settings from parent namespace Manfred Spraul
2014-06-05 12:54       ` Michael Kerrisk (man-pages)
2014-06-06 13:57         ` Serge E. Hallyn
2014-05-31  5:20 ` [PATCH 0/3] ipc: Further updates to sysv/mqueue limits Michael Kerrisk (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
2014-08-12  7:29 Manfred Spraul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox