Swappiness size

kde
memory

#21

If you want to avoid swap, you should increase that value beyond 100, but it will use your disk more (for reading). IMO the default value (100) is fine, unless you have specific needs.


#22

My concern is this, for example now, I have so much RAM free, yet swap is still used for something.

image

I have tried to find a gui tool to check out what is using swap, but nothing came up.

Maybe I don’t fully understand the concept of swap in GNU/Linux. My idea is, in simple terms, when you reach maybe 7.5 Gb out of 8 Gb, use swap and when you are done, clean it.


#23

That’s basically my approach, though cleaning is slow. My guess is you’re using some application which swaps info, or you have a huge cache/buffer being used which forces the system to swap application data. Keep in mind that chart doesn’t include cache. I don’t see that behavior on my machines.

Look at the two charts below. The first one is given by ksysguard and the second is customized by me.


Screenshot_20190201_121834_cut

Now look at the output of free:

[mbb@mbb-laptop ~]$ free
              total        used        free      shared  buff/cache   available
Mem:          11876        3194        6889         284        1791        8105
Swap:         12287         348       11939
[mbb@mbb-laptop ~]$ uptime
 12:01:07 up 7 days,  2:33,  1 user,  load average: 0,92, 0,64, 0,62

Note I’m using 348MB of swap, but I have a uptime of one week because I hibernate. This means those 348MB are remains either from resuming or from running VM’s which fill up RAM.

I usually define swappiness as 100*512/(1024*RAM_in_GB). So, my laptop having 12GB, this results in swappiness=5 (rounded up). This isn’t exact, but the result is satisfactory.


#24

I undestand now.
So I will let it be with swappiness of 10 for now. If it’s not broken don’t fix it :slight_smile:
I was just hopping that there is a tool like System Monitor, with detailed info about what used/using swap.
For me hibernation is disabled btw. I always prefer a fresh and clean start.


#25

Apparently I have worms in my ass or something, because I have tried on a second laptop to delete the swap partition to see what happens…
I got an error about the UUID. So I have restored the swap partition and modified in /etc/fstab the new UUID.
So far so good, but now I see some lines in the startup. Ar these related to swap ? (TMDS table invalid)

and in Journald.log :

full error :
image


#26

You shouldn’t have any problems as long as there’s no fstab swap entry , you don’t have an active swap file/partition, and you don’t have resume entries on /etc/default/grub

I don’t think so, those are related with a systemd crash and something to do with the nvidea free driver.


#27

I found out what is using swap --> qBittorrent


#28

My linux desktop is much more responsive without swap when I run a torrent client. Unless I am seeding only a few small files, the torrent client will constantly churn through memory and push everything else like Firefox out to swap. Even when swappiness = 1.

I have not experienced any problems so far with 8 gb ram.


#29

I use ktorrent and don’t have such problems, but I’m not a heavy seeder/client anyway. Keep in mind the higher the connection limit (I mean, the number of connections per torrent) the higher the RAM which will be need to keep track. Maybe setting a limit will use less RAM (to number of concurrent torrents and connections per torrent).


#30

For now I disabled the swap partition, the automount at startup. To see what happens.
I trid them all the torrent clients and I like qBittorrent because it’s very customizable and for example when you move a torrent from a category I also move the contents to another folder.


#31

qbittorrent also has an awesome and very efficient search function. Oftentimes when it’s hard to find some torrent in search engines, qbittorrent saves the day :slight_smile:.


#33

also that
:slight_smile: