Just felt I should post a wrap up on my swap increase journey.
All last week I ran with 4GB real memory and a total of 8GB swap.
I was using all the real memory and pretty much 4GB of swap with poor performance.
What was going on? With Fedora 28 I was running fairly well with 4GB, or was I? Plus I upgraded from a 2 core x120e to a 4 core x140e and I thought things would be better.
So this morning I pulled a 4GB card out of another x140e I have that is currently off.
Free is reporting:
$ free total used free shared buff/cache available Mem: 7416056 3609248 860448 354948 2946360 3158088 Swap: 3419132 0 3419132
and performance is just fine. So I was suffering with only 4GB of real memory. Perhaps F30 needs more than F28 or 4 core is just having more things going and needs more memory.
Anyway, going to have to pop for the $20 for a 4GB card to put into the system that is sitting with no memory....
Thanks for the help on adding a swap file. I have recorded that in my instructions file for any future need.
On 08/04/2019 07:32 PM, Tim via users wrote:
On Sun, 2019-08-04 at 12:16 -0400, Robert Moskowitz wrote:
All last week I ran with 4GB real memory and a total of 8GB swap.
I was using all the real memory and pretty much 4GB of swap with poor performance.
I think I'd consider 4 gig of RAM a bare minimum, these days. As memory size has gone up, programmers seem to have abandoned trying to be efficient.
If your prior install was apparently okay, you might have been just on the boundary between where things ran smoothly and were close to grinding through swap to operate.
When my systems started to go through swap, usually from firefox going doolallay with some badly written site, it was usually unrecoverable. I had to quit it real quick, or I could spend the next hour trying to get the computer to do a clean shutdown.
Use GParted to shrink your swap and expand your normal space. You should probably not need more than 4 GiB swap. If your repo doesn't have GParted, you can download a copy and run it from a self-booting disk. I have used it many times to move partitions around, especially to reclaim the mess that Windows 10 makes on a new computer.
--doug
your is an ThinkPad X140e ?
according to this https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/Unofficial-Max-RAM-Ca... and https://forums.lenovo.com/t5/forums/v3_1/forumtopicpage/board-id/tp02_en/thr... and https://imgur.com/a/Y5xrC
it seems there is NOT a vendor limit of 2 x 4GB only ! they are talking about an X120e with last bios, though ...
On Sun, 2019-08-04 at 12:16 -0400, Robert Moskowitz wrote:
All last week I ran with 4GB real memory and a total of 8GB swap.
I was using all the real memory and pretty much 4GB of swap with poor performance.
I think I'd consider 4 gig of RAM a bare minimum, these days. As memory size has gone up, programmers seem to have abandoned trying to be efficient.
If your prior install was apparently okay, you might have been just on the boundary between where things ran smoothly and were close to grinding through swap to operate.
When my systems started to go through swap, usually from firefox going doolallay with some badly written site, it was usually unrecoverable. I had to quit it real quick, or I could spend the next hour trying to get the computer to do a clean shutdown.
On Sun, 2019-08-04 at 16:57 -0400, Doug McGarrett wrote:
Use GParted to shrink your swap and expand your normal space. You should probably not need more than 4 GiB swap.
There is an advantage to having more swap than RAM: If you use a hibernate feature that works by dumping RAM to swap, having more ensures that it will fit. I doubt you need double, though.
On 8/4/19 10:48 PM, Tim via users wrote:
On Sun, 2019-08-04 at 16:57 -0400, Doug McGarrett wrote:
Use GParted to shrink your swap and expand your normal space. You should probably not need more than 4 GiB swap.
There is an advantage to having more swap than RAM: If you use a hibernate feature that works by dumping RAM to swap, having more ensures that it will fit. I doubt you need double, though.
Thanks for reminding me! I need to bump up my swap again and make it permanent (change fstab). 50% more than real memory should do it...
I was just looking at that basically all was running in real memory (with lots of buffer space) with no swap used, and forgot about suspend/hibernate.
On 8/5/19 1:49 PM, Samuel Sieb wrote:
On 8/5/19 3:07 AM, Robert Moskowitz wrote:
I was just looking at that basically all was running in real memory (with lots of buffer space) with no swap used, and forgot about suspend/hibernate.
Only hibernate. Suspend doesn't use the swap.
I realized this after I dashed out of the house right after I posted that missive...
I have to think if I want to facilitate hibernate when battery runs out, like on a long flight with no working AC. Or when I am just not paying attention to my power situation.
Probably since (at least so far), very little swap is in use:
$ free total used free shared buff/cache available Mem: 7416056 5254340 345472 404008 1816244 1484136 Swap: 3419132 56576 3362556
10GB of total swap would handle for those rare times the system decides to hibernate.
Not that I am short on space in the / partition to allocate a swap file...
On Mon, 2019-08-05 at 14:53 -0400, Robert Moskowitz wrote:
I have to think if I want to facilitate hibernate when battery runs out, like on a long flight with no working AC. Or when I am just not paying attention to my power situation.
I would have thought the ideal way for it to operate is when you suspend, it *also* dumps to swap. That way, when you unsuspend it springs to life really quickly. But, if your power had failed while suspended, it could unhibernate from swap.
I don't know if it actually works that way, though.
On Tue, 2019-08-06 at 19:59 +0930, Tim via users wrote:
On Mon, 2019-08-05 at 14:53 -0400, Robert Moskowitz wrote:
I have to think if I want to facilitate hibernate when battery runs out, like on a long flight with no working AC. Or when I am just not paying attention to my power situation.
I would have thought the ideal way for it to operate is when you suspend, it *also* dumps to swap. That way, when you unsuspend it springs to life really quickly. But, if your power had failed while suspended, it could unhibernate from swap.
I don't know if it actually works that way, though.
That would mean having enough available swap, which is often not the case. When I experimented with hibernate a while back I had to increase my swap space (I have 16GB of RAM) to get it to work. Of course it could fall back to not dumping to swap when in 'suspend' mode, but that might violate the Principle Of Least Astonishment.
poc
On 8/6/19 3:29 AM, Tim via users wrote:
On Mon, 2019-08-05 at 14:53 -0400, Robert Moskowitz wrote:
I have to think if I want to facilitate hibernate when battery runs out, like on a long flight with no working AC. Or when I am just not paying attention to my power situation.
I would have thought the ideal way for it to operate is when you suspend, it *also* dumps to swap. That way, when you unsuspend it springs to life really quickly. But, if your power had failed while suspended, it could unhibernate from swap.
There is a mode like that, it's called hybrid-sleep. It sets up everything for hibernation, but then just suspends. If the battery runs out, then the next boot will do a resume from hibernate. It takes longer to suspend, like hibernate does, but it resumes fast.
You can use it by running "systemctl hybrid-sleep". It isn't supported by Gnome, I don't know about other desktops.