On 2019-11-16, David Trudgian <d...@trudgian.net> wrote:
> I have also set the following systcl values:
>
>     # shared memory limits (browsers, etc.)
>     # max shared memory pages (*4096=8GB)
>     kern.shminfo.shmall=20971552
>     # max shared memory segment size (2GiB)
>     kern.shminfo.shmmax=2147483647
>     # max shared memory identifiers
>     kern.shminfo.shmmni=1024
>     # max shared memory segments per process
>     kern.shminfo.shmseg=1024

Very few programs use SysV shared memory. Use ipcs -pm and check the
CPID column for process ids. On my workstation (running several browsers
and sone other things) the only processes using this are MuPDF and
PostgreSQL (only a little, the systctl defaults are probably fine).

>     # Other
>     kern.maxproc=32768
>     kern.maxfiles=131072
>     kern.maxvnodes=262144
>     kern.bufcachepercent=50
>
> The large files numbers here are due to using syncthing, and (I'd guess)
> probably not generally advisable. The other stuff is quite likely to be
> inadvisable or just plain wrong (due to my inexperience), but it has
> given me a responsive system when using Firefox / Chromium, playing
> video etc.

That is very high for maxproc. 

If syncthing uses kqueue to monitor for changes and monitors a large
number of files then raising maxfiles is expected.

Generally don't touch bufcachepercent, it likely doesn't do what you
think it does.

Not sure about maxvnodes, I don't know what the tradeoffs are.


Reply via email to