Linux OS - Swap partition placement

tseabaugh

Member
May 6, 2005
7
0
151
I have a disagreement between two of my techs. The one who set up our most recent cpanel server (today), put all cpanel recommended partitions on the primary drive, except for swap, which he put on a secondary drive. His thinking was that putting it on the backup drive would improve performance if swap were utilized much.

Tech 2 said, you can't do that. All cpanel recommended components must be on the primary drive. Anyone know for sure? I need to know whether I should have them reinstall or if this is OK.

Thanks!
 

Blue|Fusion

Well-Known Member
Sep 12, 2004
377
0
166
Cleveland, Ohio
You shouldn't have any problems with swap on the 2nd drive. I run my home PC like that, too. May not be running cPanel, but shouldn't make any difference.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,453
31
473
Go on, have a guess
That said, if your server starts using swapfile space, you've more than likely got a performance problem and should be looking to add more memory to the server. Also, you're adding additional risk from disk failure. Should the data disk fail, you're OS may be quite upset in not having a swapfile. Considering the advantages are somewhat moot I would suggest placing it either on the OS disk or on a disk of its own. The idea of putting a swapfile (or pagefile) on a second disk really comes from Windows which uses much less sophisticated memory management.