Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Ubuntu Linux Considers Greater Usage Of zRAM

  1. #1
    Join Date
    Jan 2007
    Posts
    14,562

    Default Ubuntu Linux Considers Greater Usage Of zRAM

    Phoronix: Ubuntu Linux Considers Greater Usage Of zRAM

    Ubuntu developers and users have brought back up the matter of zRAM and using it as part of the default Ubuntu Linux installation in some intelligent manner...

    http://www.phoronix.com/vr.php?view=MTI0NjQ

  2. #2
    Join Date
    Sep 2008
    Location
    Vilnius, Lithuania
    Posts
    2,537

    Default

    for those with modern computers having several Gigabytes of system memory.
    Nitpick: memory size is typically calculated in gibibytes, not gigabytes. Otherwise you'd have to say "I have 8.4 GB of RAM!".

  3. #3
    Join Date
    Oct 2007
    Location
    Toronto-ish
    Posts
    7,418

    Default

    Yeah, strictly speaking a gigabyte is 10^^9, not 2^^30, although it gets used both ways. The term "gibibyte" (BInary GIgaBYTE presumably) is being promoted for the 2^^20 definition.

    That feels wrong somehow, although I guess "you know what I mean" isn't a good foundation for a technical standard

  4. #4
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    486

    Default

    Quote Originally Posted by BO$$ View Post
    What? [minimum length achieved]
    http://en.wikipedia.org/wiki/Binary_prefix

  5. #5
    Join Date
    Sep 2008
    Location
    Vilnius, Lithuania
    Posts
    2,537

    Default

    Quote Originally Posted by bridgman View Post
    That feels wrong somehow, although I guess "you know what I mean" isn't a good foundation for a technical standard
    Personally I set KDE to use the SI system (1 kB = 1000 B) for all the file sizes. It's apparently default on Mac OS X as well. It makes little sense to count file size in powers of two to begin with, it just causes confusion, especially when dealing with large files. Though it does make sense for RAM, because its modules come in sizes of powers of two.

    And yea, Windows, last time I checked, still incorrectly labels "MB" and such even if it really means "MiB". Though I'm not sure if it was changed in Windows 8 or not. Probably not.

  6. #6

    Default

    I need an explanation about zRAM.

    If I understand it well, it will use RAM instead of disk for swapping/paging, right?

    Swapping happens when the system runs out of RAM and needs more. Then it will save some of the RAM contents on disk, free that RAM portion and use it. OK so far?

    So a system with a lot of RAM will never need to swap, or need it very rarely. A system with very little RAM will swap pretty soon. Now, if you use zRAM, you make swapping just happen earlier. How is this good at all? Yes, you're swapping to RAM, but you might as well use that RAM directly and have no need for swapping.

    Say you have 1GB of RAM and devote 256MB to zRAM. Now you have 768MB available. When the system needs 900MB, it will use part or your zRAM as its swap area. If you didn't have zRAM, the system would have accessed RAM directly: no need to swap. If the system needs 2GB, it'll swap to disk anyway, since the 256MB of zRAM will be of no use in that case.

    I'm confused. I'm definitely missing something. I'd appreciated an explanation.
    Last edited by Aleve Sicofante; 12-08-2012 at 09:22 PM.

  7. #7

    Default

    Quote Originally Posted by bridgman View Post
    Yeah, strictly speaking a gigabyte is 10^^9, not 2^^30, although it gets used both ways. The term "gibibyte" (BInary GIgaBYTE presumably) is being promoted for the 2^^20 definition.

    That feels wrong somehow, although I guess "you know what I mean" isn't a good foundation for a technical standard
    The JEDEC standard defines 1GB as 2**30 bytes.

  8. #8
    Join Date
    Apr 2011
    Location
    Slovakia
    Posts
    75

    Default

    Quote Originally Posted by Aleve Sicofante View Post
    I need an explanation about zRAM.
    Say you have 1GB of RAM and devote 256MB to zRAM. Now you have 768MB available. When the system needs 900MB, it will use part or your zRAM as its swap area. If you didn't have zRAM, the system would have accessed RAM directly: no need to swap. If the system needs 2GB, it'll swap to disk anyway, since the 256MB of zRAM will be of no use in that case.

    I'm confused. I'm definitely missing something. I'd appreciated an explanation.
    But zRAM is COMPRESSED. So imagine the system can put 512MB of data into that 256MB pool. Suddenly you have like 1,25GB of RAM. Yes, there is a tradeoff. Those 512MB can't be accessed directly by the kernel and the compression/decompression takes some CPU time. However, the theory says that even this is still faster than swapping to physical disk.

  9. #9
    Join Date
    Oct 2007
    Location
    Toronto-ish
    Posts
    7,418

    Default

    Quote Originally Posted by ryao View Post
    The JEDEC standard defines 1GB as 2**30 bytes.
    Are you talking about 100B.01 ? If so, doesn't that only cover microprocessors and memory where binary interpretation is the norm ?

    Most of the other standards (which need to deal with memory, disk, networking, etc..) seem to be heading towards interpreting GB as decimal and using something like GiB for binary.

    Maybe we should use JGB (Jedec GigaByte) or MGB (Memory GigaByte) for binary and GB for decimal
    Last edited by bridgman; 12-08-2012 at 11:00 PM.

  10. #10
    Join Date
    Dec 2008
    Posts
    148

    Default

    I just say "gigs" to avoid the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •