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

Thread: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

  1. #1

    Question 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Hi,

    New to openSUSE...

    I have 16GB RAM and under full load I use about 10GB RAM.
    The swap file is being activated which I don't want.

    How to stop swap file from being used?

    Let me know, thanks!

    Jesse

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,817
    Blog Entries
    15

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Quote Originally Posted by JeZ-l-Lee View Post
    Hi,

    New to openSUSE...

    I have 16GB RAM and under full load I use about 10GB RAM.
    The swap file is being activated which I don't want.

    How to stop swap file from being used?

    Let me know, thanks!

    Jesse
    Hi
    Configure sysctl..... Tweak pressure as required. Some folks have found 125 better.

    Code:
    cat /etc/sysctl.d/98-swap.conf
    
    #disable swap
    vm.swappiness=1
    vm.vfs_cache_pressure=50
    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

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Hi,

    I tried that but got error:
    Code:
    jlp@SortFastDesktop:~> cat /etc/sysctl.d/98-swap.conf
    cat: /etc/sysctl.d/98-swap.conf: No such file or directory
    jlp@SortFastDesktop:~>
    I don't want to turn off swap file, just want to adjust the usage.
    (have swap file use started at higher RAM usage)

    Let me know, thanks!

    Jesse

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,844
    Blog Entries
    2

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Some documentation so you understand the consequences of disabling/inactivating/removing swap

    Althouth the following is a SUSE document, it should also apply to openSUSE
    https://www.suse.com/support/kb/doc/?id=7010157
    Although the following SDB is very old and not updated, skimming the content suggests that everything described should also apply to current openSUSE (TW, 15.2, 15.1)
    https://en.opensuse.org/SDBartitioning
    Some interesting RHEL documentation
    https://www.redhat.com/en/blog/do-we...modern-systems

    The following ArchWiki article describes various commands including disabling swap (without removal)
    Also includes descriptions for various swap options like compressed
    https://wiki.archlinux.org/index.php/Swap

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,817
    Blog Entries
    15

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Quote Originally Posted by JeZ-l-Lee View Post
    Hi,

    I tried that but got error:
    Code:
    jlp@SortFastDesktop:~> cat /etc/sysctl.d/98-swap.conf
    cat: /etc/sysctl.d/98-swap.conf: No such file or directory
    jlp@SortFastDesktop:~>
    I don't want to turn off swap file, just want to adjust the usage.
    (have swap file use started at higher RAM usage)

    Let me know, thanks!

    Jesse
    Hi
    It doesn't turn it off, it just makes sure it uses ram before going to swap.... best solution more ram

    Code:
     free
                  total        used        free      shared  buff/cache   available
    Mem:       23598564     2510152    14840200      611308     6248212    20080452
    Swap:       1972384           0     1972384
    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!

  6. #6
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,763

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Quote Originally Posted by JeZ-l-Lee View Post
    Hi,

    I tried that but got error:
    Of course, unless you create such a file yourself (BTW, you need superuser permissions to write to that place).
    Leap 15.1 Gnome on i7 4720HQ + Geforce GTX960M
    testing Leap 15.2Alpha

  7. #7
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,763

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    This is the effect on a 16 GB RAM system:
    Code:
    LT_B:~ # cat /etc/sysctl.d/sysctl.conf
    vm.swappiness=1
    vm.vfs_cache_pressure=50
    LT_B:~ # free
                  total        used        free      shared  buff/cache   available
    Mem:       16304312    10601332      159928      557508     5543052     4798932
    Swap:       8388604           0     8388604
    LT_B:~ #
    Leap 15.1 Gnome on i7 4720HQ + Geforce GTX960M
    testing Leap 15.2Alpha

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,844
    Blog Entries
    2

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    FYI - Noticed on my TW there is a utility that can disable all or some swap on the system
    Code:
    swapoff
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,817
    Blog Entries
    15

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Quote Originally Posted by tsu2 View Post
    FYI - Noticed on my TW there is a utility that can disable all or some swap on the system
    Code:
    swapoff
    TSU
    Hi
    Or use my systemd-zram-service

    Code:
    Information for package systemd-zram-service:
    ---------------------------------------------
    Repository     : Main Repository (OSS)             
    Name           : systemd-zram-service
    
    
    zramswapon
    Setting up swapspace version 1, size = 2.8 GiB (3020615680 bytes)
    ....
    
    free
                  total        used        free      shared  buff/cache   available
    Mem:       23598564     2636524    14649016      596516     6313024    19968872
    Swap:      25570944           0    25570944
    
    zramswapoff
    
    free
                  total        used        free      shared  buff/cache   available
    Mem:       23598564     2528376    14746068      607612     6324120    20065924
    Swap:       1972384           0     1972384
    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!

  10. #10

    Default Re: 16GB RAM / 10GB Used - Swap File Being Used? How To Stop Swap File From Being Used?

    Hi,

    Will:
    Code:
    swapoff
    Survive a reboot?
    (need something permanent)

    Let me know, thanks!

    Jesse

Page 1 of 3 123 LastLast

Posting Permissions

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