ZRAM Misconceptions and Doubts

Forum Forums General Tips and Tricks ZRAM Misconceptions and Doubts

  • This topic has 0 replies, 1 voice, and was last updated Nov 7-4:14 am by SamK.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2072
    Forum Admin
    AvatarSamK

    This is rescued from the defunct antiX forum for the benefit of new users who cannot access that old forum and others who might not have seen the original topic. It deals with the misconceptions of a user about the effects of using zram on his old, resource constrained kit.

    Author: SamK

    Mon Nov 27, 2016 13:06
    Quote Ninho:

    …it would seem disadvantageous, having already a small total of RAM,
    to reduce the size available for processes even more. In addition,
    the operation of zram compression/decompression would be taxing
    a slow CPU, hence reducing the performance overall, wouldn’t it ?

    These are reasonable questions that I have seen asked by others when first thinking of using zram. You went on to answer your own questions when you went on to say

    Mon Nov 27, 2016 13:06
    Ninho:

    I might as well do so expermineting of my own…

    In the end it is the only way you will reach a decision.

    Mon Nov 27, 2016 13:06
    Ninho:

    …it would seem disadvantageous, having already a small total of RAM,
    to reduce the size available for processes even more.

    Presumably your view extends to the use of compressed files like zip or tgz or 7z files using up some disk space that could be used for other files or even allocating a swap partition means there is less overall disk space available.

    Mon Nov 27, 2016 13:06
    Ninho:

    In addition, the operation of zram compression/decompression would
    be taxing a slow CPU, hence reducing the performance overall…

    This is understandable speculation. Try it for yourself then decide. I have never noticed the effect you describe even on the least powerful kit.

    Re-read the original linked post Tips for Improving Performance on Ancient Kit
    its basic thrust is about ways to optimise performance on ancient kit. Often such kit has a low spec. Trying to use that kit in the same way you might use modern high spec kit is a fruitless exercise. So if you intend to use zram to achieve that be prepared for a disappointment. The post covers a range of ideas, any one of which may not produce a big gain. The right combination of them (which might include the use of zram) is much more likely to produce worthwhile results. One of the ways to obtain the most noticeable improvements is to choose appropriate apps and use them in a sensible way. If you want to use any form of swap space to compensate for a lack of physical RAM in old kit in order to employ demanding modern apps you are again likely to be disappointed. You will get much more performance from your old system by slightly modifying the way you perform your daily tasks and using other lightweight apps to do them. By giving up a small amount of convenience it is possible to obtain large gains.

    On old resource limited kit, trying to view zram in isolation is not helpful. It is more beneficial to look at it in the context of your overall system which in essence means the capability of your hardware, the apps you intend to use, and the way you use them.

    I’m not advocating in favour or against the use of zram. It is your system and in the end you will make your own choice. When building a system I use guidelines and a form of flowchart for swap space that I prepared some years back. I never published them because swap space is one of those contentious areas where people tend to aggressively defend their own preferences. All I will say is they have served me well and whenever I use zram (often in conjunction with a disk based swap space) I am happy with the outcome.

    29 Nov 2016, 14:43
    Ninho:

    Still not convinced there could be any circumstances to make such an arrangement beneficial…

    That’s OK, as I said previously I’m not trying to convince you or anyone else, though your comment has a tang of having done little before making such an observation.

    A few thoughts off-the-top-of-my-head

    • It seems unlikely that zram would be merged into the Linux kernel if there was no benefit to it
    • Running in RAM is inherently faster than running from disk; that includes swap
    • Using antiX in live nomadic mode on modern highly spec’d kit that you do not administrate and thereby cannot be certain a disk based swap area is available or accessible
    • Potentially extending the life of a USB stick running antiX in live mode when a swap space is wanted on the stick

    Some quotes from https://en.wikipedia.org/wiki/Zram

    wikipedia:

    zram was merged into the Linux kernel mainline in kernel version 3.14…
    […]
    Since using zram is an alternative way to provide swapping on RAM, zram allows Linux to make a better use of RAM when swapping/paging is required, especially on older computers with less RAM installed.
    […]
    Google uses zram in Chrome OS since 2013[7] and in Android since its version 4.4.[8] Lubuntu also started using zram in its version 13.10.[9] As of December 2012,[needs update?] Ubuntu has considered enabling zram by default on computers with small amounts of installed RAM

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.