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.
Since systems these days are now are hitting the GB range in ram, how will this affect the swap partition? Swap is limited to some 2,050GB according to partition magic, but with cfdisk you can make a swap partition to any size you want, though if you do a free command, it will show swap to maybe around 2xxxx instead. So, at this point when having say 2GB of ram, should swap be kept around the same range? And what if you have even more ram then that? Should swap not even be considered? Also, I do not know how Linux handles hibernate/sleep. Does it actually use swap for that? I know in windows it create it's own file, called hiberfil.sys. Though I think I read that Linux might use swap for the hibernate function as well as swapping memory, but I don't remember where I read this, and in fact I may just be totally wrong.
Right now on my notebook, I have 2GB, and so I decided to just not even bother with a swap partition, though some might say it would be a good idea to create one just in case, but I don't see the purpose, since now the usual swap rule no longer seems valid because of the limitation to 2GB. (amount of ram * 2 = size of swap). Thoughts anyone?
With hard disk space so cheap, I generally keep around a 512MB swap partition "just in case". But neither my desktop w/ 2GB RAM or my notebook w/ 768MB RAM ever use it...
I have 1gb of RAM at home, and keep a 2gb swap partition. The price of hard drives per gb is so dirt cheap now it really isn't an issue to have even a 2gb swap partition.
Plus, I've found the swap handy the few times either something has gone wrong (logs overflowing, processes out of control, etc.), or I have done some really heavy work (like opening tons and tons and tons of images in Gimp).
Crashing without swap is rather messy, with swap you at least have the slight buffer of safety "just in case". Like I said, 2gb of 400gb is no big deal on today's hard drives.
Necessity of a swap partition depeneds on what use you out your machine to. If you are into video editing or into other multimedia apps that consume tons of resources then 2GB of RAM aint' enough !! You will require several GBs of swap for a good performance.
Otherwise, if you are using your machine only document management, browsing and the like stuff you can do away with 1GB RAM.
If you want to use the suspend to disk (hibernate) functionality, you should have a swap partition big enough to hold the contents of RAM and other data.
It is definitely possible to use a file instead of a partition for swapping. I am not sure if you can do the same with suspend2disk. Maybe, I'll try it out sometime and post the results here !!
Originally posted by Kevkim55
If you are into video editing or into other multimedia apps that consume tons of resources then 2GB of RAM aint' enough !! You will require several GBs of swap for a good performance.
Ok, but if you have 2 GB of ram, that means a 4GB swap, but how would that work, if the technical limit of swap is 2GB? Multiple swap partitons? I doubt that would be feasable.
Ok, but if you have 2 GB of ram, that means a 4GB swap, but how would that work, if the technical limit of swap is 2GB? Multiple swap partitons? I doubt that would be feasable.
Has been supported for (very many) years. Current (x86) limit is 32 extents of 2 Gig. Should suffice for a while. If you use more than one kswapd will use them concurrently (i.e. a software stripe-set). Not much benefit on a single disk, but it does its best to help.
Has been supported for (very many) years. Current (x86) limit is 32 extents of 2 Gig. Should suffice for a while. If you use more than one kswapd will use them concurrently (i.e. a software stripe-set). Not much benefit on a single disk, but it does its best to help.
Exactly ! I've been using two swap partitions and it does help a lot and performs well !!
...If you use more than one kswapd will use them concurrently (i.e. a software stripe-set). Not much benefit on a single disk, but it does its best to help.
Note that this only can happen if you give your swap partitions exactly the same priority (the pri option in fstab). Otherwise your swap spaces are used like lineal RAID, first fills the top priority swap, then the next one, etc
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.