Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
If you have about 8 GB of RAM, swap is only needed for hibernation. Do you use this feature? I am sure that if you try to use hibernate instead of shutdown your computer for a couple of days you will see something used in swap. Swap partition will be never used if your computer has 8 GB RAM and you shutdown it every day -- no swap is needed and it's normal.
Swap is used in two cases (well, three if you count hibernation):
- Your system runs out of RAM and needs to swap out currently unused parts to make place for currently used parts. If you have enough RAM that your workload fits completely into it this won't happen.
- The system determines that a task is idle for very long times and the memory it uses can better be used for caching. This mostly happens on long running systems which tasks that only run occasionally. An example would be an always running mail-client that checks for mail every few hours, but does nothing in between.
It seems that neither is the case for you, so no need to worry. A problem would be if neither is the case but the system would still be hitting swap.
There used to be a great need for swap.
Over the years the need for it has been reduced in most home users systems only because modern ram is so cheap and fast and amounts are large.
Some programs still might go to swap, but for the most part it will only be there if needed.
The old rule of some multiple is not valid anymore. 2.5 time ram is not a great guess anymore. Swap generally never hurts so you can safely keep it. Making it too large may not hurt anymore too because hard drives are so large relative to past.
You still have choices to make raid swap, change swap settings as in joke about swappines, and can make swap files too.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,679
Rep:
Quote:
Originally Posted by hack3rcon
Thank you so much.
But Windows OS use Page files every time .
Only on older versions, I think, and it's due to Windows memory management being a little dense.
As mentioned above there may be legitimate reasons to place data into swap, to free up RAM for a disk cache of more often used data for example, but if there is plenty of RAM there is simply no need to use swap. As far as I can tell Windows no longer uses the swap when it is not needed after about Windows 7 -- though I suspect some is sometimes allocated but not actually used.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.