Hello, Please have a look; https://www.reddit.com/r/openSUSE/comments/mfs53x/tip_enable_zram_easily/ it is written as follows; Zram uses your CPU to compress swap which makes your PC faster ( People say it boosts the performance even though it uses your CPU ) Using Zram can reduce the read/write cycles on an SSD and increases its durability. In adsdition from https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/ [...] What is ZRAM? ZRAM creates a block device in RAM where pages that would otherwise be written to swap (disk/SSD) are instead first compressed, then stored. This allows for a much faster I/O of swap, and also, the data compression provides a significant amount of memory savings. A downside of ZRAM is that it uses some CPU for compression, but this is usually negated by the gains achieved from avoiding disk swap and the overall memory savings of compression. So keep those things in mind per your usage. In my case; 1. before installation of zram $ free -m total used free shared buff/cache available Mem: 96297 4831 65144 84 26321 90403 Swap: 4095 0 4095 2. after installtion $ free -m total used free shared buff/cache available Mem: 96297 5383 64598 77 26315 89857 Swap: 100393 0 100393 where; # zramctl --output-all NAME DISKSIZE DATA COMPR ALGORITHM STREAMS ZERO-PAGES TOTAL MEM-LIMIT MEM-USED MIGRATED MOUNTPOINT /dev/zram0 94G 4K 62B zstd 16 0 20K 0B 20K 0B [SWAP] You will soon see the effect of ZRAM implementation. The dramatic improvement in sound quality is very pleasing, as well as the crisp running of applications. Regards. --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Maddox hopes that empowering users to pick their own algorithms will get them to think more about what’s involved in making them. " -- Bluesky's Custom Algorithms Could Be the Future of Social Media --
On 7/31/23 00:32, Masaru Nomiya wrote:
Hello,
Please have a look;
https://www.reddit.com/r/openSUSE/comments/mfs53x/tip_enable_zram_easily/
it is written as follows;
Zram uses your CPU to compress swap which makes your PC faster
( People say it boosts the performance even though it uses your CPU ) Using Zram can reduce the read/write cycles on an SSD and increases its durability.
In adsdition from
https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/
[...] What is ZRAM?
ZRAM creates a block device in RAM where pages that would otherwise be written to swap (disk/SSD) are instead first compressed, then stored. This allows for a much faster I/O of swap, and also, the data compression provides a significant amount of memory savings.
A downside of ZRAM is that it uses some CPU for compression, but this is usually negated by the gains achieved from avoiding disk swap and the overall memory savings of compression. So keep those things in mind per your usage.
That's damn interesting. Only thing I don't get is how does adding a compression layer improve performance? I just haven't read enough yet. I can see swap/read/write benefits for systems that heavily swap - but for systems that don't swap at all - I guess there wouldn't be any benefit? Interesting enough to learn more about. It will certainly make sense for some use cases. -- David C. Rankin, J.D.,P.E.
On 7/31/23 18:13, David C. Rankin wrote:
swap/read/write benefits for systems that heavily swap - but for systems that don't swap at all - I guess there wouldn't be any benefit?
Kind of my thoughts also. My computers sometimes swap, but a pretty small number. When I see one of my machines starting to use swap, especially lots of swap, I start looking to see what's misbehaving. My major problem is the CPU's running hot, I have a cron job that runs every 6 minutes to check for that. So I guess I'll create a simple cron job to watch swap, run it hourly, and have the computer email me if it gets over a set percentage being used.
Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <9b05760a-7117-b422-b763-27982c8da51f@suddenlinkmail.com> Date & Time: Mon, 31 Jul 2023 21:13:08 -0500 [DCR] == "David C. Rankin" <drankinatty@suddenlinkmail.com> has written: DCR> On 7/31/23 00:32, Masaru Nomiya wrote: [...]
What is ZRAM?
ZRAM creates a block device in RAM where pages that would otherwise be written to swap (disk/SSD) are instead first compressed, then stored. This allows for a much faster I/O of swap, and also, the data compression provides a significant amount of memory savings.
A downside of ZRAM is that it uses some CPU for compression, but this is usually negated by the gains achieved from avoiding disk swap and the overall memory savings of compression. So keep those things in mind per your usage.
I found ZRAM on a site about Fedora, looked up ZRAM on it, and adopted it. However, the method described for Fedora did not apply to openSUSE, so I installed the following, which I found in YaST2, out of the blue; systemd-zram-service-0.2.1-12.23.noarch libudisks2-0_zram-2.9.4-116.23.x86_64 zram-generator-1.1.2-14.28.x86_64 Here, I found /usr/lib/systemd/system/zramswap.service, so I tried # systemctl enable zramswap.service and it worked! Then, I searched for a description of this in openSUSE, and found the site I mentioned before. According to the description on this site, we do not need anything except systemd-zram-service-0.2.1-12.23.noarch, but I haven't uninstalled others. DCR> That's damn interesting. Only thing I don't get is how does DCR> adding a compression layer improve performance? Wikipedia says the following; When used for swap, zram (like zswap) allows Linux to make more efficient use of RAM, since the operating system can then hold more pages of memory in the compressed swap than if the same amount of RAM had been used as application memory or disk cache. DCR> I can see swap/read/write benefits for systems that heavily swap DCR> - but for systems that don't swap at all - I guess there DCR> wouldn't be any benefit? Wikiepdia also says the following; Using zram also results in significantly reduced I/O for Linux systems that require swapping. Is there any system that does not swapping,I wonder...? Anyway, I think ZRAM setting is a must for SSD users like me. Since there is no need to consider data loss in case of failure, to further reduce access to the SSD, I have changed the default of vm.dirty_writeback_centisecs = 500 to vm.dirty_writeback_centisecs = 6000. Regards. --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Maddox hopes that empowering users to pick their own algorithms will get them to think more about what’s involved in making them. " -- Bluesky's Custom Algorithms Could Be the Future of Social Media --
On 7/31/23 22:49, Masaru Nomiya wrote:
Is there any system that does not swapping,I wonder...? Anyway, I think ZRAM setting is a must for SSD users like me.
This is just where I need to read more. Are they talking page-swaps in RAM or are they talking about swapping to disk? Every system will benefit if is magically improves page-swaps, but for those with 16G, 32G in RAM that never swap-to-disk, if that is what Zram is compressing, then on many boxes it won't do anything. I'll admit, I'm just ignorant on which they mean. but if they are using the term Zram instead of Zswap, it would seem it is basic page-swaps they are talking about long before we get to swapping to disk. Also, if it is page-swaps, than I guess it's just talking about being able to store more compressed memory to RAM. I don't see how it would be able to hook and manipulate what the processor stores in cache, so it would seem to just be memory evicted from cache that would normally be stored in RAM that would be compressed. (though since program memory is binary to begin with, I guess it works some magic on it to make it worthwhile -- all well beyond my pay/understanding grade) Will read more and update. Still a really good idea. Will have to get down in the weeds of it to know if it makes sense for me. Because in: $ uptime 23:25:22 up 6 days 17:59, 2 users, load average: 0.24, 0.20, 0.17 with on 8G of RAM on a heavily used laptop with multiple browsers, e-mail, editors, IDE's, apache2 running with php, etc.. I've only managed to use 93M of swap: $ free -tm total used free shared buff/cache available Mem: 7878 2563 1237 54 4430 5315 Swap: 2057 93 1964 Total: 9936 2656 3202 -- David C. Rankin, J.D.,P.E.
Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <816a4b9b-1787-97df-b7b4-cf7dcc03a89d@suddenlinkmail.com> Date & Time: Mon, 31 Jul 2023 23:27:40 -0500 [DCR] == "David C. Rankin" <drankinatty@suddenlinkmail.com> has written: DCR> On 7/31/23 22:49, Masaru Nomiya wrote: MN> > Is there any system that does not swapping,I wonder...? Anyway, I think ZRAM MN> > setting is a must for SSD users like me. DCR> This is just where I need to read more. Are they talking DCR> page-swaps in RAM or are they talking about swapping to disk? When using zram as compressed swap space, zram is similar to zswap (Virtual memory compression), which is an in-kernel compressed cache for swap pages rather than a general-purpose RAM disk. In contrast, using zram for swap, like zswap, is a more efficient use of RAM for Linux. That is, the OS can hold more memory pages in compressed swap compared to using the same amount of RAM as application memory or disk cache. This zram feature is said to be beneficial for netbooks and other low-power laptops, virtualization devices, and especially embedded devices, those using flash memory. [...] DCR> Will read more and update. Still a really good idea. Will have DCR> to get down in the weeds of it to know if it makes sense for me. ZRAM itself, being deemed stable, was released to mainline on kernel 3.14 (3/30/2014). Fedora has adopted ZRAM swap as standard from 33 onward. Regards. --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ " Hassabis says that no one really knows for sure that AI will become a major danger. But he is certain that if progress continues at its current pace, there isn’t much time to develop safeguards. "I can see the kinds of things we're building into the Gemini series right, and we have no reason to believe that they won't work," he says." -- "Google DeepMind's CEO Says Its Next Algorithm Will Eclipse ChatGPT" --
On 2023-08-01 06:27, David C. Rankin wrote:
On 7/31/23 22:49, Masaru Nomiya wrote:
Because in:
$ uptime 23:25:22 up 6 days 17:59, 2 users, load average: 0.24, 0.20, 0.17
with on 8G of RAM on a heavily used laptop with multiple browsers, e-mail, editors, IDE's, apache2 running with php, etc.. I've only managed to use 93M of swap:
$ free -tm total used free shared buff/cache available Mem: 7878 2563 1237 54 4430 5315 Swap: 2057 93 1964 Total: 9936 2656 3202
I really like more "-h", but if I'm reading this correctly you only have 2.5 gigs used, with 4.4 used for buffers/cache, 1 free and 5 available. So you don't need much swap. With an strategy to put swap in ram, compressed, you would use a further percent of 93 megs of ram, say a 75..25%. The advantage would be faster user of that swap. If swap is actively used, meaning code being put and extracted from swap in order to run it, that action would be faster. But still, you would have somewhat less of ram available. So the end result depends on the actual load of each machine. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
From: Masaru Nomiya <nomiya@lake.dti.ne.jp> Date: Tue, 01 Aug 2023 12:49:18 +0900 . . . Wikiepdia also says the following; Using zram also results in significantly reduced I/O for Linux systems that require swapping. Is there any system that does not swapping,I wonder...? Apparently, mine. My desktop has 8GB of RAM, and today I noticed (thanks to this thread) that I have been running without any swap. This turned out to be simply because I forgot to configure one when I chose the disk partitioning when installing 15.5. Looking at /etc/fstab on my 15.4 and 15.3 installations shows that I forgot there as well, so it appears that I've been running without swap for at least several years now, and never noticed. Which pretty much proves that I haven't needed it. Which is just as well, since I don't have an SSD. -- Bob Rogers http://www.rgrjr.com/
Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25800.42718.707224.847181@orion.rgrjr.com> Date & Time: Mon, 31 Jul 2023 23:31:58 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: BR> From: Masaru Nomiya <nomiya@lake.dti.ne.jp> BR> Date: Tue, 01 Aug 2023 12:49:18 +0900 BR> . . . MN> Wikiepdia also says the following; MN> Using zram also results in significantly reduced I/O for MN> Linux systems that require swapping. MN> Is there any system that does not swapping,I wonder...? BR> Apparently, mine. My desktop has 8GB of RAM, and today I noticed BR> (thanks to this thread) that I have been running without any swap. This BR> turned out to be simply because I forgot to configure one when I chose BR> the disk partitioning when installing 15.5. Looking at /etc/fstab on my BR> 15.4 and 15.3 installations shows that I forgot there as well, so it BR> appears that I've been running without swap for at least several years BR> now, and never noticed. Which pretty much proves that I haven't needed BR> it. Which is just as well, since I don't have an SSD. Hmmm, there it is.... Could you show the result of; $ cat /proc/sys/vm/swappiness Regards. --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Maddox hopes that empowering users to pick their own algorithms will get them to think more about what’s involved in making them. " -- Bluesky's Custom Algorithms Could Be the Future of Social Media --
From: Masaru Nomiya <nomiya@lake.dti.ne.jp> Date: Tue, 01 Aug 2023 15:56:55 +0900 Hmmm, there it is.... Could you show the result of; $ cat /proc/sys/vm/swappiness Here it is: root@orion> cat /proc/sys/vm/swappiness 60 root@orion> This is approximately 24 hours after starting to use the 5GiB swap partition the disk has had all along, BTW. ================ From: "Carlos E. R." <robin.listas@telefonica.net> Date: Tue, 1 Aug 2023 11:21:02 +0200 free -tmh would show you the status of memory and whether you might need swap. The fact that I've been without swap for years and not seen the OOM killer hasn't convinced you that I don't need it? ;-} But here it is in any case: root@orion> free -tmh total used free shared buff/cache available Mem: 6.7Gi 2.9Gi 247Mi 140Mi 4.0Gi 3.8Gi Swap: 5.0Gi 0.0Ki 5.0Gi Total: 11Gi 2.9Gi 5.2Gi root@orion> Still looks like plenty of room to me. I attribute this to dealing with the electronic world mostly in terms of text, via emacs. This strikes me as supremely ironic; people used to complain that "emacs" stood for "eight megabytes and constantly swapping." (This, of course, is way out of date; the binaries I build are ~30MB, and the two-week-old emacs instance I am using to write this has an RSS of almost half a gig.) -- Bob
Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25801.35950.569474.658097@orion.rgrjr.com> Date & Time: Tue, 1 Aug 2023 15:51:26 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: BR> From: Masaru Nomiya <nomiya@lake.dti.ne.jp> BR> Date: Tue, 01 Aug 2023 15:56:55 +0900 MN> Hmmm, there it is.... MN> Could you show the result of; MN> $ cat /proc/sys/vm/swappiness BR> Here it is: BR> root@orion> cat /proc/sys/vm/swappiness BR> 60 BR> root@orion> It is the default state. BR> This is approximately 24 hours after starting to use the 5GiB swap BR> partition the disk has had all along, BTW. What? You wrote as follows; In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25800.42718.707224.847181@orion.rgrjr.com> Date & Time: Mon, 31 Jul 2023 23:31:58 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: BR> Looking at /etc/fstab on my 15.4 and 15.3 installations shows BR> that I forgot there as well, so it appears that I've been running BR> without swap for at least several years now, and never noticed. BR> Which pretty much proves that I haven't needed it. BR> ================ BR> From: "Carlos E. R." <robin.listas@telefonica.net> BR> Date: Tue, 1 Aug 2023 11:21:02 +0200 CER> free -tmh CER> would show you the status of memory and whether you might need swap. BR> The fact that I've been without swap for years and not seen the OOM BR> killer hasn't convinced you that I don't need it? ;-} BR> But here it is in any case: BR> root@orion> free -tmh BR> total used free shared buff/cache available BR> Mem: 6.7Gi 2.9Gi 247Mi 140Mi 4.0Gi 3.8Gi BR> Swap: 5.0Gi 0.0Ki 5.0Gi BR> Total: 11Gi 2.9Gi 5.2Gi BR> root@orion> Your system uses swap! Carlos knew that it was fine to have no swap entries in fstab... But how, Carlos? Regards. --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ " Hassabis says that no one really knows for sure that AI will become a major danger. But he is certain that if progress continues at its current pace, there isn’t much time to develop safeguards. "I can see the kinds of things we're building into the Gemini series right, and we have no reason to believe that they won't work," he says." -- "Google DeepMind's CEO Says Its Next Algorithm Will Eclipse ChatGPT" --
From: Masaru Nomiya <nomiya@lake.dti.ne.jp> Date: Wed, 02 Aug 2023 16:21:18 +0900 Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25801.35950.569474.658097@orion.rgrjr.com> Date & Time: Tue, 1 Aug 2023 15:51:26 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: BR> Here it is: BR> root@orion> cat /proc/sys/vm/swappiness BR> 60 BR> root@orion> It is the default state. Thought so. BR> This is approximately 24 hours after starting to use the 5GiB swap BR> partition the disk has had all along, BTW. What? I only added the swap after reading this thread. I still had the swap partition because my disk has long since been partitioned, and I always upgrade by doing a fresh install into an existing partition using the manual partitioning option. It's just that lately I've been failing to add the swap partition, because ISTR the installer used to select all swap partitions for use automatically even when you chose manual partitioning, and I hadn't noticed when it stopped doing that. (Does anybody else remember that?) ================ From: "Carlos E. R." <robin.listas@telefonica.net> Date: Wed, 2 Aug 2023 21:48:17 +0200 On 2023-08-02 13:40, Masaru Nomiya wrote:
. . . You can't tell if the swap space is being used or not without looking at the swap I/O. The only way to do that is to use the sar command.
If swap is used, there is always a few megabytes in it, unless there has been a manual command to disable swap. Even in which case, with almost half my RAM free, swap is shown to be unnecessary, which is the interesting conclusion. -- Bob
Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25802.47628.602772.55886@orion.rgrjr.com> Date & Time: Wed, 2 Aug 2023 13:18:20 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: BR> From: Masaru Nomiya <nomiya@lake.dti.ne.jp> BR> Date: Wed, 02 Aug 2023 16:21:18 +0900 [...] BR>>> root@orion> cat /proc/sys/vm/swappiness BR>>> 60 BR>>> root@orion> MN>> It is the default state. BR> Thought so. BR>>> This is approximately 24 hours after starting to use the 5GiB swap BR>>> partition the disk has had all along, BTW. MN> What? BR> I only added the swap after reading this thread. Then I figured it out. I wondered if you were using magic. BR> I still had the swap partition because my disk has long since been BR> partitioned, and I always upgrade by doing a fresh install into BR> an existing partition using the manual partitioning option. I used to do it the same way before I moved to Tumbleweed. BR> It's just that lately I've been failing to add the swap partition, BR> because ISTR the installer used to select all swap partitions for BR> use automatically even when you chose manual partitioning, and I BR> hadn't noticed when it stopped doing that. Hmmm... I don't get this one. BR> (Does anybody else remember that?) Well, can anyone figure it out? --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ " Hassabis says that no one really knows for sure that AI will become a major danger. But he is certain that if progress continues at its current pace, there isn’t much time to develop safeguards. "I can see the kinds of things we're building into the Gemini series right, and we have no reason to believe that they won't work," he says." -- "Google DeepMind's CEO Says Its Next Algorithm Will Eclipse ChatGPT" --
From: Masaru Nomiya <nomiya@lake.dti.ne.jp> Date: Thu, 03 Aug 2023 09:54:00 +0900 Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25802.47628.602772.55886@orion.rgrjr.com> Date & Time: Wed, 2 Aug 2023 13:18:20 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: BR> It's just that lately I've been failing to add the swap partition, BR> because ISTR the installer used to select all swap partitions for BR> use automatically even when you chose manual partitioning, and I BR> hadn't noticed when it stopped doing that. Hmmm... I don't get this one. I told the installer where to put the root partition, but didn't tell it to use the swap partition, because I thought I didn't need to, and just never noticed. -- Bob
Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25803.356.937386.130855@orion.rgrjr.com> Date & Time: Wed, 2 Aug 2023 18:22:44 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: [...] BR>>> It's just that lately I've been failing to add the swap partition, BR>>> because ISTR the installer used to select all swap partitions for BR>>> use automatically even when you chose manual partitioning, and I BR>>> hadn't noticed when it stopped doing that. MN>> Hmmm... I don't get this one. BR> I told the installer where to put the root partition, but didn't tell it BR> to use the swap partition, because I thought I didn't need to, and just BR> never noticed. I thought I had to set up a swap partition to continue the installation process... Regards. --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ " Hassabis says that no one really knows for sure that AI will become a major danger. But he is certain that if progress continues at its current pace, there isn’t much time to develop safeguards. "I can see the kinds of things we're building into the Gemini series right, and we have no reason to believe that they won't work," he says." -- "Google DeepMind's CEO Says Its Next Algorithm Will Eclipse ChatGPT" --
From: Masaru Nomiya <nomiya@lake.dti.ne.jp> Date: Thu, 03 Aug 2023 10:34:33 +0900 Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <25803.356.937386.130855@orion.rgrjr.com> Date & Time: Wed, 2 Aug 2023 18:22:44 -0700 [BR] == Bob Rogers <rogers@rgrjr.com> has written: BR> I told the installer where to put the root partition, but didn't tell it BR> to use the swap partition, because I thought I didn't need to, and just BR> never noticed. I thought I had to set up a swap partition to continue the installation process... Maybe that used to be true, but it certainly isn't now. And, based on my experience, it hasn't been for at least a few release cycles now. -- Bob
On 2023-08-02 00:51, Bob Rogers wrote: ...
================ From: "Carlos E. R." <robin.listas@telefonica.net> Date: Tue, 1 Aug 2023 11:21:02 +0200
free -tmh
would show you the status of memory and whether you might need swap.
The fact that I've been without swap for years and not seen the OOM killer hasn't convinced you that I don't need it? ;-}
Sure, but one wants to see how much so ;-)
But here it is in any case:
root@orion> free -tmh total used free shared buff/cache available Mem: 6.7Gi 2.9Gi 247Mi 140Mi 4.0Gi 3.8Gi Swap: 5.0Gi 0.0Ki 5.0Gi Total: 11Gi 2.9Gi 5.2Gi root@orion>
Swap is available (5 gigs) but not used; you said you did not have any. Unless you have created it now, your message was not correct. If you have created it just now, that would explain why it is not used. Otherwise, that is weird. Ah! Checking your mail again, I see you said:
This is approximately 24 hours after starting to use the 5GiB swap partition the disk has had all along, BTW.
It is a bit strange that it has used nothing of that swap after 24 hours, though. You have only 247 MiB free, that is little. The system would normally send some to swap and have more free. But you have 4 gigs in buffer/cache, so your system is not starving.
Still looks like plenty of room to me. I attribute this to dealing with the electronic world mostly in terms of text, via emacs. This strikes me as supremely ironic; people used to complain that "emacs" stood for "eight megabytes and constantly swapping." (This, of course, is way out of date; the binaries I build are ~30MB, and the two-week-old emacs instance I am using to write this has an RSS of almost half a gig.)
Try LO :-P -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Hello, In the Message; Subject : Re: Let's use ZRAM! Message-ID : <d3793c31-34ee-cb5d-e39f-6744c9d1b335@telefonica.net> Date & Time: Wed, 2 Aug 2023 10:51:44 +0200 [CER] == "Carlos E. R." <robin.listas@telefonica.net> has written: [...] BR> > But here it is in any case: BR> > BR> > root@orion> free -tmh BR> > total used free shared buff/cache available BR> > Mem: 6.7Gi 2.9Gi 247Mi 140Mi 4.0Gi 3.8Gi BR> > Swap: 5.0Gi 0.0Ki 5.0Gi BR> > Total: 11Gi 2.9Gi 5.2Gi BR> > root@orion> CER> Swap is available (5 gigs) but not used; How can you say this? What he showed was that there is 5GB of swap space, but it is not being used when the free command is used. You can't tell if the swap space is being used or not without looking at the swap I/O. The only way to do that is to use the sar command. Redards & Good Night. --- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Maddox hopes that empowering users to pick their own algorithms will get them to think more about what’s involved in making them. " -- Bluesky's Custom Algorithms Could Be the Future of Social Media --
On 2023-08-02 13:40, Masaru Nomiya wrote:
Hello,
In the Message;
Subject : Re: Let's use ZRAM! Message-ID : <d3793c31-34ee-cb5d-e39f-6744c9d1b335@telefonica.net> Date & Time: Wed, 2 Aug 2023 10:51:44 +0200
[CER] == "Carlos E. R." <robin.listas@telefonica.net> has written:
[...] BR> > But here it is in any case: BR> > BR> > root@orion> free -tmh BR> > total used free shared buff/cache available BR> > Mem: 6.7Gi 2.9Gi 247Mi 140Mi 4.0Gi 3.8Gi BR> > Swap: 5.0Gi 0.0Ki 5.0Gi BR> > Total: 11Gi 2.9Gi 5.2Gi BR> > root@orion>
CER> Swap is available (5 gigs) but not used;
How can you say this?
What he showed was that there is 5GB of swap space, but it is not being used when the free command is used.
You can't tell if the swap space is being used or not without looking at the swap I/O. The only way to do that is to use the sar command.
If swap is used, there is always a few megabytes in it, unless there has been a manual command to disable swap. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On 2023-08-01 08:31, Bob Rogers wrote:
From: Masaru Nomiya <nomiya@lake.dti.ne.jp> Date: Tue, 01 Aug 2023 12:49:18 +0900
. . .
Wikiepdia also says the following;
Using zram also results in significantly reduced I/O for Linux systems that require swapping.
Is there any system that does not swapping,I wonder...?
Apparently, mine. My desktop has 8GB of RAM, and today I noticed (thanks to this thread) that I have been running without any swap. This turned out to be simply because I forgot to configure one when I chose the disk partitioning when installing 15.5. Looking at /etc/fstab on my 15.4 and 15.3 installations shows that I forgot there as well, so it appears that I've been running without swap for at least several years now, and never noticed. Which pretty much proves that I haven't needed it. Which is just as well, since I don't have an SSD.
free -tmh would show you the status of memory and whether you might need swap. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Tuesday, 1 August 2023 4:01:58 PM ACST Bob Rogers wrote:
From: Masaru Nomiya <nomiya@lake.dti.ne.jp> Date: Tue, 01 Aug 2023 12:49:18 +0900
. . .
Wikiepdia also says the following;
Using zram also results in significantly reduced I/O for Linux systems that require swapping.
Is there any system that does not swapping,I wonder...?
Apparently, mine. My desktop has 8GB of RAM, and today I noticed
[...[ And mine. I have 32GB RAM. I never see more than 6GiB in use unless I happen to be running a Win11 VM, to which I have allocated 8GB RAM, so then my RAM usage goes up to around 14-16GiB max! I have not had swap enabled for years. root@mako ~ # free -tm total used free shared buff/cache available Mem: 31766 7008 576 176 24775 24758 Swap: 0 0 0 Total: 31766 7008 576 -- ================================================================================================================== Rodney Baker rodney.baker@iinet.net.au ==================================================================================================================
This seems like dejá vu all over again... Leslie On 2023-07-31 00:32:22 Masaru Nomiya wrote:
Hello,
Please have a look;
https://www.reddit.com/r/openSUSE/comments/mfs53x/tip_enable_zram_easily/
it is written as follows;
Zram uses your CPU to compress swap which makes your PC faster
( People say it boosts the performance even though it uses your CPU ) Using Zram can reduce the read/write cycles on an SSD and increases its durability.
In adsdition from
https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/
[...] What is ZRAM?
ZRAM creates a block device in RAM where pages that would otherwise be written to swap (disk/SSD) are instead first compressed, then stored. This allows for a much faster I/O of swap, and also, the data compression provides a significant amount of memory savings.
A downside of ZRAM is that it uses some CPU for compression, but this is usually negated by the gains achieved from avoiding disk swap and the overall memory savings of compression. So keep those things in mind per your usage.
In my case;
1. before installation of zram
$ free -m
total used free shared buff/cache available Mem: 96297 4831 65144 84 26321 90403 Swap: 4095 0 4095
2. after installtion
$ free -m
total used free shared buff/cache available Mem: 96297 5383 64598 77 26315 89857 Swap: 100393 0 100393
where;
# zramctl --output-all NAME DISKSIZE DATA COMPR ALGORITHM STREAMS ZERO-PAGES TOTAL MEM-LIMIT MEM-USED MIGRATED MOUNTPOINT /dev/zram0 94G 4K 62B zstd 16 0 20K 0B 20K 0B [SWAP]
You will soon see the effect of ZRAM implementation.
The dramatic improvement in sound quality is very pleasing, as well as the crisp running of applications.
Regards.
--- ┏━━┓彡 野宮 賢 mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Maddox hopes that empowering users to pick their own algorithms will get them to think more about what’s involved in making them. "
-- Bluesky's Custom Algorithms Could Be the Future of Social Media --
participants (7)
-
Bill Swisher
-
Bob Rogers
-
Carlos E. R.
-
David C. Rankin
-
J Leslie Turriff
-
Masaru Nomiya
-
Rodney Baker