All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ipc: Further updates to sysv/mqueue limits
@ 2014-08-12  7:29 Manfred Spraul
  2014-08-12  7:29 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
  0 siblings, 1 reply; 14+ 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] 14+ messages in thread
* [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
  0 siblings, 1 reply; 14+ 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] 14+ messages in thread

end of thread, other threads:[~2014-08-15 13:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12  7:29 [PATCH 0/3] ipc: Further updates to sysv/mqueue limits Manfred Spraul
2014-08-12  7:29 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
2014-08-12  7:29   ` [PATCH 2/3] ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM Manfred Spraul
     [not found]     ` <1407828557-31995-3-git-send-email-manfred-nhLOkwUX5cPe2c5cEj3t2g@public.gmane.org>
2014-08-12  7:29       ` [PATCH 3/3] ipc namespace: copy settings from parent namespace Manfred Spraul
2014-08-12  7:29         ` Manfred Spraul
     [not found]         ` <1407828557-31995-4-git-send-email-manfred-nhLOkwUX5cPe2c5cEj3t2g@public.gmane.org>
2014-08-12 10:37           ` Eric W. Biederman
2014-08-12 10:37             ` Eric W. Biederman
     [not found]             ` <877g2ec7tg.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2014-08-12 20:39               ` Manfred Spraul
2014-08-12 20:39                 ` Manfred Spraul
2014-08-15 13:42           ` Rafael Aquini
2014-08-15 13:42             ` Rafael Aquini
2014-08-15 13:42     ` [PATCH 2/3] ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM Rafael Aquini
2014-08-15 13:41   ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Rafael Aquini
  -- strict thread matches above, loose matches on Subject: below --
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.