Results 1 to 6 of 6

Thread: zram enquiry.

  1. #1
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Question zram enquiry.

    Hello

    Prior to converting both my PCs to oS TW, back when they used to use Mint KDE4 & then Maui Plasma5, i successfully used zram for memory/swap benefits. Since i now use TW, i've been experimenting with zram in some of my openSUSE TW VMs, to gauge if they might later be worthwhile deploying in the "real" TWs.

    I found that there seems to be some alternatives, which i've been trying to understand their respective applicability & pros/cons.



    I understand Malcolm's systemd-zram-service-0.2.1-1.7.noarch.rpm ok, for which in one VM i achieved:
    Code:
    BEFORE enabling & starting zramswap.service
    linux-bgps:~> free -h
                  total        used        free      shared  buff/cache   available
    Mem:           2.0G        562M        586M         10M        850M        1.2G
    Swap:          2.0G          0B        2.0G
    
    
    linux-bgps:~> free -h |grep Swap
    Swap:          2.0G          0B        2.0G
    .................................................................................
    
    
    
    
    AFTER enabling & starting zramswap.service
    linux-bgps:~> free -h
                  total        used        free      shared  buff/cache   available
    Mem:           2.0G        570M        578M         10M        850M        1.2G
    Swap:          4.0G          0B        4.0G
    
    
    linux-bgps:~> free -h |grep Swap
    Swap:          4.0G          0B        4.0G

    However i'm puzzled by zramcfg, which either i've incorrectly deployed [in a separate VM], or otherwise might be broken:
    Code:
    linux-sr0s:~> free -h              total        used        free      shared  buff/cache   available                                                                                  
    Mem:           2.9G        1.1G         79M         18M        1.7G        1.6G                                                                                  
    Swap:          2.0G         91M        1.9G                                                                                                                      
    
    linux-sr0s:~> sudo systemctl enable zramcfg.service                                                                                                      
    [sudo] password for root:                                                                                                                                        
    Created symlink /etc/systemd/system/multi-user.target.wants/zramcfg.service → /usr/lib/systemd/system/zramcfg.service.                                           
    linux-sr0s:~> sudo systemctl start zramcfg.service                                                                                                       
    
    linux-sr0s:~> sudo systemctl status zramcfg.service                                                                                                      
    ● zramcfg.service - ZRAM configuration                                                                                                                           
       Loaded: loaded (/usr/lib/systemd/system/zramcfg.service; enabled; vendor preset: disabled)                                                                    
       Active: active (exited) since Sat 2017-07-29 21:11:34 AEST; 16s ago                                                                                           
      Process: 30963 ExecStart=/usr/sbin/zramcfg load (code=exited, status=0/SUCCESS)                                                                                
     Main PID: 30963 (code=exited, status=0/SUCCESS)                                                                                                                 
                                                                                                                                                                     
    Jul 29 21:11:34 linux-sr0s systemd[1]: Starting ZRAM configuration...                                                                                             
    Jul 29 21:11:34 linux-sr0s zramcfg[30963]: Could not load configuration file /etc/zram.cfg
    Jul 29 21:11:34 linux-sr0s systemd[1]: Started ZRAM configuration.
    
    linux-sr0s:~> free -h
                  total        used        free      shared  buff/cache   available
    Mem:           2.9G        1.1G         81M         18M        1.7G        1.6G
    Swap:          2.0G         91M        1.9G
    Sure enough, when i inspect /etc/ , there is no file zram.cfg

    My questions are, please:
    1. Did i do something wrong with zramcfg, or is it broken?
    2. What's the best way to decide between those 4 alternatives in my original picture, ie, which one to use?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,485
    Blog Entries
    15

    Default Re: zram enquiry.

    Hi
    If you look at the man page and python script, it looks like you need the run the command manually first (zramcfg.py) and set the configuration. It also points to zramctl, perhaps you need to look at the man page for this as well....?

    https://github.com/hreinecke/zramcfg
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Default Re: zram enquiry.

    Quote Originally Posted by malcolmlewis View Post
    Hi
    If you look at the man page and python script, it looks like you need the run the command manually first (zramcfg.py) and set the configuration. It also points to zramctl, perhaps you need to look at the man page for this as well....?

    https://github.com/hreinecke/zramcfg
    Ah, man-pages, sigh. I hope that some day soon when i wake up, i will have finally got it through my skull that man-pages exist, are a thing, & that i need to look at them first. For inexplicable reasons, i still constantly forget all about them. Sorry.

    Anyway, they didn't assist me to progress here, but not to worry, i'll just keep using your one [systemd-zram-service], & begin frying other fish now. Thank you once more.

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,163
    Blog Entries
    1

    Default Re: zram enquiry.

    The ArchWiki pages are usually of good value too....

    https://wiki.archlinux.org/index.php...#Zram_or_zswap

  5. #5
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Default Re: zram enquiry.

    Quote Originally Posted by deano_ferrari View Post
    The ArchWiki pages are usually of good value too....

    https://wiki.archlinux.org/index.php...#Zram_or_zswap
    Oh cool, thank you.

  6. #6

    Lightbulb Re: zram enquiry.

    I finished a fifth script today, which should superceed the one from malcolm, is simple and pretty stable (at least the version I am working on now, it might happen, that you'll get a broken release, because I'm updating the package)
    My goal was to make a simple, robust and foolproof package.

    https://build.opensuse.org/package/s...lr/zramservice

    no need for zramcfg, in fact you should avoid using multiple zram managers :-)
    Feel free to give feedback

Posting Permissions

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