tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Autotuning of kern.ipc.shmmaxpgs

On Mon, Feb 23, 2009 at 02:56:49PM +0000, Mindaugas Rasiukevicius wrote:
> Joerg Sonnenberger <> wrote:
> > currently the maximum size of SysV shared memory is limited by a static
> > MD limit. The attached patch allows platforms to not specify such a
> > limit. If the kernel config doesn't specify one either, the kernel will
> > compute a limit on startup based on physmem. Platforms with limited KVA
> > can also set SHMMAX_AUTO_LIMIT, which places an upper boundary on the
> > auto-tuned value.
> - I tend to think that removing MD definitions of SHMMAXPGS (or SHMMAX)
>   would be the right thing to do.

In general: yes.

> - Why do you think KVA is the issue here?

It is the only reason I can find for having a MD limit at all. If it is
not considered an issue on things like VAX which can't grow the kernel
map, I'm all for removing the static limits completely. Given that the
shared memory segments are directly attached to to the process's vmmap,
it should be irrelevant here.

> - SHMMNI would also need tuning. Unlike SHMMAX, it has a direct effect to
>   the memory consumption.

I haven't run into a situation where the default doesn't work, so I
can't suggest a good scaling factor. One trivial change could be to make
shmsegs an array of pointers and allocate the struct shmid_ds entries


Home | Main Index | Thread Index | Old Index