Using zRam with oVirt Nodes

Hello folks. On simple libvirt/KVM hosts in order to improve RAM usage and avoid swap to disk I use zRam with swap to RAM technique. So create half of amount of host memory in zRam disk divided by the number of CPU cores. Works pretty well. Has anyone tried it with oVirt Nodes or even has it been considered as a feature to simply turn on/off ? Thanks Fernando

On Dec 30, 2016 7:06 PM, "Fernando Frediani" <fernando.frediani@upx.com.br> wrote: Hello folks. On simple libvirt/KVM hosts in order to improve RAM usage and avoid swap to disk I use zRam with swap to RAM technique. So create half of amount of host memory in zRam disk divided by the number of CPU cores. Works pretty well. Has anyone tried it with oVirt Nodes or even has it been considered as a feature to simply turn on/off ? What exactly is the use case? I'd use zram for temporary disks, using the VDSM hook for them. I think you are referring to zswap? Y. Thanks Fernando _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

This is a multi-part message in MIME format. --------------C7F99C471D9E0D4B42D95D5F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello it's the same thing zswap. The use case is to be able to put more stuff in a single host without it need needing to swap to slow disks. You sacrifice CPU and avoid a lot slower swap to disk. Fernando On 30/12/2016 16:41, Yaniv Kaul wrote:
On Dec 30, 2016 7:06 PM, "Fernando Frediani" <fernando.frediani@upx.com.br <mailto:fernando.frediani@upx.com.br>> wrote:
Hello folks.
On simple libvirt/KVM hosts in order to improve RAM usage and avoid swap to disk I use zRam with swap to RAM technique. So create half of amount of host memory in zRam disk divided by the number of CPU cores. Works pretty well.
Has anyone tried it with oVirt Nodes or even has it been considered as a feature to simply turn on/off ?
What exactly is the use case? I'd use zram for temporary disks, using the VDSM hook for them. I think you are referring to zswap? Y.
Thanks Fernando
_______________________________________________ Users mailing list Users@ovirt.org <mailto:Users@ovirt.org> http://lists.ovirt.org/mailman/listinfo/users <http://lists.ovirt.org/mailman/listinfo/users>
--------------C7F99C471D9E0D4B42D95D5F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <p>Hello it's the same thing zswap.</p> <p>The use case is to be able to put more stuff in a single host without it need needing to swap to slow disks. You sacrifice CPU and avoid a lot slower swap to disk.</p> <p>Fernando</p> <div class="moz-cite-prefix">On 30/12/2016 16:41, Yaniv Kaul wrote:<br> </div> <blockquote cite="mid:CAJgorsaLkPqhrNvK7ttWx2EwpJ_pzQh3T6KW4AsXF7GPNj3jqg@mail.gmail.com" type="cite"> <div dir="auto"> <div><br> <div class="gmail_extra"><br> <div class="gmail_quote">On Dec 30, 2016 7:06 PM, "Fernando Frediani" <<a moz-do-not-send="true" href="mailto:fernando.frediani@upx.com.br">fernando.frediani@upx.com.br</a>> wrote:<br type="attribution"> <blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello folks.<br> <br> On simple libvirt/KVM hosts in order to improve RAM usage and avoid swap to disk I use zRam with swap to RAM technique. So create half of amount of host memory in zRam disk divided by the number of CPU cores. Works pretty well.<br> <br> Has anyone tried it with oVirt Nodes or even has it been considered as a feature to simply turn on/off ?<br> </blockquote> </div> </div> </div> <div dir="auto"><br> </div> <div dir="auto">What exactly is the use case? </div> <div dir="auto">I'd use zram for temporary disks, using the VDSM hook for them. </div> <div dir="auto">I think you are referring to zswap? </div> <div dir="auto">Y. </div> <div dir="auto"> <div class="gmail_extra"> <div class="gmail_quote"> <blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> Thanks<br> Fernando<br> <br> ______________________________<wbr>_________________<br> Users mailing list<br> <a moz-do-not-send="true" href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br> <a moz-do-not-send="true" href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br> </blockquote> </div> <br> </div> </div> </div> </blockquote> <br> </body> </html> --------------C7F99C471D9E0D4B42D95D5F--

I enable zSwap on my oVirt nodes by default. However zSwap is not the same thing as zRam. The purpose of zSwap is decreasing I/O by compressing swap itself. zSwap uses some ram for compressed swap, but it doesn’t try to keep a page in memory if it can’t be compressed. I find using of zRam without swap too risky. You don’t know when OOM killer start its job. -----Original Message----- From: <users-bounces@ovirt.org> on behalf of Fernando Frediani <fernando.frediani@upx.com.br> Date: Friday 30 December 2016 at 20:06 To: "users@ovirt.org" <users@ovirt.org> Subject: [ovirt-users] Using zRam with oVirt Nodes Hello folks. On simple libvirt/KVM hosts in order to improve RAM usage and avoid swap to disk I use zRam with swap to RAM technique. So create half of amount of host memory in zRam disk divided by the number of CPU cores. Works pretty well. Has anyone tried it with oVirt Nodes or even has it been considered as a feature to simply turn on/off ? Thanks Fernando _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

All nodes I user zSwap (or Swap in zRam) I do have also some swap space in disk with lower priority which when/if gets used means something warning. Overall the usage of zSwap helps a lot to increase the density of a Host at the cost of CPU which in most cases is more idle than memory or storage Fernando On 30/12/2016 21:47, Pavel Gashev wrote:
I enable zSwap on my oVirt nodes by default. However zSwap is not the same thing as zRam. The purpose of zSwap is decreasing I/O by compressing swap itself. zSwap uses some ram for compressed swap, but it doesn’t try to keep a page in memory if it can’t be compressed.
I find using of zRam without swap too risky. You don’t know when OOM killer start its job.
-----Original Message----- From: <users-bounces@ovirt.org> on behalf of Fernando Frediani <fernando.frediani@upx.com.br> Date: Friday 30 December 2016 at 20:06 To: "users@ovirt.org" <users@ovirt.org> Subject: [ovirt-users] Using zRam with oVirt Nodes
Hello folks.
On simple libvirt/KVM hosts in order to improve RAM usage and avoid swap to disk I use zRam with swap to RAM technique. So create half of amount of host memory in zRam disk divided by the number of CPU cores. Works pretty well.
Has anyone tried it with oVirt Nodes or even has it been considered as a feature to simply turn on/off ?
Thanks Fernando
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (3)
-
Fernando Frediani
-
Pavel Gashev
-
Yaniv Kaul