3 ms·
is there any case not having swap hurt ? assume the RAM alone are enough for heaviest load, no memory leak, no exhaustive ... that's it, the server is never ou
by hs 17y ago
is there any case not having swap hurt ?
assume the RAM alone are enough for heaviest load, no memory leak, no exhaustive ... that's it, the server is never out of RAM memory
hmmm, does hn server use swap?
- hs 17y agohttp://www.openbsd.org/faq/faq14.html http://www.openbsd.org/faq/faq14.html 14.4.1 - About swap Historically, all kinds of rules have been tossed about to guide administrators on how much swap to configure on their machines. The problem, of course, is there are few "normal" application. One non-obvious use for swap is to be a place the kernel can dump a copy of what is in core in the event of a system panic for later analysis. For this to work, you must have a swap partition (not a swap file) at least as large as your RAM. By default, the system will save a copy of this dump to /var/crash on reboot, so if you wish to be able to do this automatically, you will need sufficient free space on /var. However, you can also bring the system up single-user, and use savecore(8) to dump it elsewhere. Many types of systems may be appropriately configured with no swap at all. For example, firewalls should not swap in normal operation. Machines with flash storage generally should not swap. If your firewall is flash based, you may benefit (slightly) by not allocating a swap partition, though in most other cases, a swap partition won't actually hurt anything; most disks have more than enough space to allocate a little to swap. There are all kinds of tips about optimizing swap (where on the disk, separate disks, etc.), but if you find yourself in a situation where optimizing swap is an issue, you probably need more RAM. In general, the best optimization for swap is to not need it. In OpenBSD, swap is managed with the swapctl(8) program, which adds, removes, lists and prioritizes swap devices and files.