NetBSD-Users archive

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

Re: Any advanatages to keeping process virtual memory to a minimum?



On Sat, 11 Jul 2020 14:24:10 +0100
Sad Clouds <cryintothebluesky%gmail.com@localhost> wrote:

> On NetBSD default thread stack size seems to be around 8 MiB, which is
> quite a lot and most of the time threads don't need this much space.
> 
> When creating large number of threads, process' virtual memory (VSZ)
> can be quite large. This can be reduced with
> pthread_attr_setstacksize() but I wonder if there are any advantages
> to doing this? Solaris used to reserve swap space based on process
> memory usage, but this doesn't apply to NetBSD. Are there any usage
> scenarios on NetBSD where the size of virtual memory can be important?

Well, I just found one issue, gcore is refusing to work with 100
threads. When I reduce thread stack size to 8 KiB, gcore succeeds.
There doesn't seem to be a limit on core file size, unless I've missed
something. Is this a bug?

rp4$ ulimit -c
unlimited

rp4$ sysctl -a | grep coredumpsize
proc.curproc.rlimit.coredumpsize.soft = unlimited
proc.curproc.rlimit.coredumpsize.hard = unlimited

rp4$ gcore 17185
gcore: ptrace(PT_DUMPCORE) to 17185 failed: Input/output error


Home | Main Index | Thread Index | Old Index