by kev009 · 12y ago · 0 comments
The mmap, file-max, and SHM advice is application dependent. Understand what your system is doing, and only increase if necessary. i.e. PostgreSQL < 9.3 is the only large user of SHM I can think of off hand.
The limits.conf advice is also bad. You should have a safety net here and increase these as needed and per user in /etc/security/limits.d
A less harmful guide would be something like "these are the knobs you may need to turn for certain apps, and here is the documentation on what they affect" - this looks a bit better https://wiki.archlinux.org/index.php/sysctl
Sysctl variables in Linux meet all these same criteria. Linux is already tuned for general use (or is damn close to it). Any knob you tweak is likely to make things worse in a way you don't understand. Just leave things unless you have a specific use case that requires different tuning.
The optimal value for what? Speed? Performance? Comfort? Economics? I don't drive a car, but wouldn't trade-offs apply to car tuning just like it does to everything else?
http://tweaked.io/guide/kernel/
In practice the file-handles tweak is the one that many people seem to forget, and can make a big difference for heavy webservers.
Side note: noatime is possible on OSX too [0]
[0]: https://github.com/tlvince/noatime-osx/blob/master/com.tlvin...