> I would appreciate an explanation of the difference between max data
> size, max locked-in-memory size, max resident set size, max stack
> size and address space limit.
max data size - total memory (including swap) allocated for anything
max locked in memory size - maximum amount of non-swapable memory allowed
max resident set size - maximum physical memory allowed
max stack size - maximum size of the stack (used for passing local
values, return values, and keeping track of the function call chain
among other things.)
address space limit - the virtual memory limit
I'd be wary of making any drastic changes. Only root can lock pages in
memory currently anyway, so altering the max locked-in value is
probably useless. I seriously doubt many programs lock more than a
single page anyway.
I also wouldn't reduce the stack overmuch. Good programs depend on
being able to store quite a bit of data in it.
That leaves resident size, data size, and address space limits. There
aren't any "good" numbers for those, since they depend on the platform