SWAP size for Solaris v2.8
Posted on 2004-05-02
The System: Sun SparcServer 20 with 384 MB of RAM, a 1GB boot drive and an internal 9GB drive (so, total, about 10 GB disk space on board). Installing Solaris v2.8 (10/00) with latest Recommended Patches and Maintenance Update #7.
I am confused as to how much SWAP space to allocate when laying out the disk space. I have seen varying recommendations, including:
=RAM + 32MB
=1.5 x RAM
=2 x RAM
=3 x RAM
So, what IS the story? How much SWAP space should I allocate?
The system will be a general-purpose machine, handling E-Mail, shell accounts, and web-service for 10-20 users. Nothing very strenuous, no massive Oracle installs, no heavy scripting. I suspect its hardest task will be dealing with spam, and perhaps the occasional PHP in a user's web-page.
On a tangent, should I allocate a specific amount of physical disk space to /tmp, in an effort to prevent a system DOS attack where virtual memory is filled by writing to /tmp? Or should I not create a /tmp partition on physical disk and leave it to tmpfs?