Ram & SWAP error

iacsvrn

New Member
Apr 25, 2016
1
0
1
32
First:

When I`m upload iso files to the server ( ssh / web interface ) I have a situation in which not used SWAP.

Screenshot:

6vVul5Yqsz4.jpg



Second: RAM don`t clear, when I finished upload iso`s ( this problem I solved by command "
echo 3 > /proc/sys/vm/drop_caches " )

Can anybody help me with this?
 
i think this is normal behaviour?

your swap is not used because you have enough free RAM
and the cache in the RAM is not instantly cleared, why should it?
linux tries to always use the RAM when it can

and yes, your command will clear the caches, but again this should not be necessary
 
Yeah, I don't understand what the problem is here.

Linux by default uses free system RAM to cache disks and all sorts of other things. This cache helps speed up future disk reads, as they are read from the fast ram, instead of the relatively slow disk. We WANT Linux to do this. It is a good thing, it improves performance, lowers power consumption and reduces wear on drives.

This DOES NOT mean that the file has not yet been committed to disk. It usually has right away (unless drive is mounted async, and even then it's usually only a delay of a second or two). If you want to make sure changes have been committed to the drive (if you are paranoid) you can use the command "sync", which should write all non-written blocks to the drive instantly and update the superblock.

If you want to tell the difference between RAM used by programs and RAM used by caches, you can go to the console and look at the "free" command.

Code:
root@proxmox:~# free -h
             total       used       free     shared    buffers     cached
Mem:          188G        79G       109G        49M        92M        11G
-/+ buffers/cache:        67G       121G
Swap:          58G        13M        58G

In this example from my server there are 188GB in total (192 actually, not sure the reported amount is lower)

79GB of these are used in total (by either programs, or caches)

109GB are free and completely unused.

11GB of the 79GB above are being used as cache.

If you look under the +/- caches sections we see:

67GB are actually used by programs, so if I suddenly load up my server with all my VM's and it starts running out of RAM, it will drop the cache and use it for programs. The total amount of RAM available, once caches are dropped is 121GB.

I hope this helps.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!