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.
I am not convinced that I will need swap as I don't generally run may programs at the same time. Is it possible to get through the installation process without adding a swap partition?
I am not convinced that I will need swap as I don't generally run may programs at the same time. Is it possible to get through the installation process without adding a swap partition?
I am not convinced that I will need swap as I don't generally run may programs at the same time.
Swap is used for a few other functions beside taking care of a memory overload. It is also used for the sleep and hibernate functions. If you use one of these functions then you need a swap file a little bigger than your memory size.
Swap is used for a few other functions beside taking care of a memory overload. It is also used for the sleep and hibernate functions. If you use one of these functions then you need a swap file a little bigger than your memory size.
Technically, the swap image is saved in a compressed form, then if you use the memory almost at max without going into swap, you can still hibernate well in a swap partition with half of size of memory - tested by myself with great success in the last 10 years or so.
This is my personal and well tested recipe for the swap partition size: half of memory size.
Last edited by LuckyCyborg; 04-11-2022 at 02:20 PM.
Technically, the swap image is saved in a compressed form, then if you use the memory almost at max without going into swap, you can still hibernate well in a swap partition with half of size of memory - tested by myself with great success in the last 10 years or so.
This is my personal and well tested recipe for the swap partition size: half of memory size.
Does this require certain things like zswap or does hibernation automatically compress the memory contents without any tweaks needed?
(I've never set up hibernation as all my systems basically run 24/7.)
Technically, the swap image is saved in a compressed form, then if you use the memory almost at max without going into swap, you can still hibernate well in a swap partition with half of size of memory - tested by myself with great success in the last 10 years or so.
This is my personal and well tested recipe for the swap partition size: half of memory size.
This is possible, but not recommended. If you do not want to set a swap partition, you could set instead a swap file after installation.
Agreed! I would set up a small swap partition during installation or afterwards as Didier mentioned. Once in a while you may be doing some high memory intensive activities like compiling a giant application on SBo. Hard drives these days are huge so setting aside a 2 GB swap file will not impact your day to day computer usage. It's better to have swap and not need it than to need swap and and have your PC run out of memory.
Does this require certain things like zswap or does hibernation automatically compress the memory contents without any tweaks needed?
(I've never set up hibernation as all my systems basically run 24/7.)
No special configuration is needed. The data from swap image is compressed (and decompressed) automatically.
RE: the ZSWAP - it's an entire another thing. Yet, quite useful. Practically, you know that any partition device (excluding the Linux swap) uses an in-memory cache of disk operations, to speedup the things and asynchronous save the data on disk.
The ZWAP basically adds a (compressed) cache for the swap partitions and the effects are great, greatly improving the behavior at heavy memory load.
I for one I use ZWAP on all my systems, no matter if they are Slackware, Ubuntu or openSUSE. BUT, it requires some configuration in the kernel command like. Personally, I use
I'm always concern with high performance, so my view has a bias.
I've not used swap for the last 10 years. No issues at all. In fact I always mount /tmp as a tmpfs (to use more the RAM), this makes things like compiling really fast. Why, just because now computers have a lot of RAM.
I don't hybernate my laptop. My laptop can be suspended for a couple days without problem. If I'm going to power it off for more time I just shut it down, but I don't remember the last time I needed to do that.
Yes, swap can save you if your programs are allocating a lot of memory and the physical memory is full, but even my laptop with 16GB of memory that almost never happened to me (well I'm using LXDE and not KDE).
RAM is at least 100 times faster than a SATA SSD, why whould I want to slow down the data access. RAM access is also parallel (because of the different cache levels), SATA SSD access is sequential.
In the past I had servers that went unresponsive because they have a process using all memory and started to move data to swap. The only solution was to kill the process that was eating the memory. If you don't have swap the "Linux Out-Of-Memory Killer" just kills the process that is causing the problem sooner, no need to try to save it by dumping memory to the swap partition, just to have a slow death.
At work we have servers with 1TB of RAM and 4TB of SSD, what amount of swap would make sense, that is not a waste of disk?
At work we have servers with 1TB of RAM and 4TB of SSD, what amount of swap would make sense, that is not a waste of disk?
About 1GB of disk swap is useful to hold those pages that various long-running daemon processes use during startup and never reference again. Eventually, those will migrate out to swap. Leaving them in memory is just a waste of RAM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.