SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everybody,
i'm installing Slamd64 on my SunFire V40z server (2 AMD Opteron 64bit with 4GB RAM and 72GB RAID1 hard drive configuration).
I will use it only in console mode (no X server) and it'll run MySQL server, Apache and Courier-IMAP, but... i don't know which is the right swap size choice...
Some people say to make two 2GB swap partition, other say to use more less...
Because i don't want to waste my precious hard disk space, how big this partition(s) should be??
Thanx a lot in advance!
Nice greetings!
most of the swap is going unused. waste of space. double the RAM is just a convention from old times when people used to had too less memory. we still need swap but the x2 convention just wastes space in actual high memory systems.
Hi everybody,
i'm installing Slamd64 on my SunFire V40z server (2 AMD Opteron 64bit with 4GB RAM and 72GB RAID1 hard drive configuration).
I will use it only in console mode (no X server) and it'll run MySQL server, Apache and Courier-IMAP, but... i don't know which is the right swap size choice...
Some people say to make two 2GB swap partition, other say to use more less...
Because i don't want to waste my precious hard disk space, how big this partition(s) should be??
Thanx a lot in advance!
Nice greetings!
Simone.
Hi,
With the RAM that you have for this machine, the swap size could be in the 512MB range. Your swap will see little to no activity.
My question is why you feel the hard disk space is so precious? Heck, the byte cost is low for HD space now days. You say you use RAID1. What are the HD specifications? Is it a 10K drive?
While I doubt it applies in this case, if you are planning to use the swap partition to hibernate the computer you'll want to have a partition that can hold all the data in RAM plus what's in video ram. So, as others have noted, don't be stingy with swap space.
On the other end of the scale, keep in mind that the minimum swap size is only 4K and you'll have to press a machine really hard to ever make one freeze up running with no swap at all. I've only been able to do this by compiling mozilla suite with all tests and debugging on a 350MHz iMac with less than 200MB RAM. i realize you are running a server yo you'll want to have some around, but no need to get carried away unless your needs are special or heavy.
I would recommend 1GB of swap. You won't be using a significant amount of disk space and if you use more than 512MB of it, which will happen only after going through the 4GB of RAM, you will have 512MB in reserve.
What do you anticipate the load of this server to be? Apache and MySQL can consume huge amounts of resources if given enough work to do and data to play with.
Swap is an emergency, slow solution, of out-of-memory situation.
In your position, I would like the "risky path": no swap. 4G of RAM is huge, unless your servers are serving thousands of people simultanouesly. But I can't understand, how big a server can be :-) It will mainly "transfer files" right? So, the memory (4G) will be a great cache. You need also to use swap as cache? I don't think so.
Check how much memory your servers need with free. I don't run mySQL server (yet) and mail server, but my system is happy with 256MB RAM and 100MB swap (25used) apache + php + ssh + several deamons + iceWM + 32MB of ramdisks.
Conservative approach: add 512MB of swap and then disabled if you find with free that is not used.
Surely there must be a log file which generates statistics of the general usage of your Linux system. Unfortunately, I have no idea what its name might be. Somebody drop us a hint, please
Regarding swap space specifically, TLDP seems to have some good advice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.