Operating System - Linux
1752619 Members
4167 Online
108788 Solutions
New Discussion юеВ

Re: My swap memory is not at all used.

 
Sandeep_Chaudhary
Trusted Contributor

My swap memory is not at all used.

My swap memory is not at all used.Physical memory utilization is continiously high.
slxde009# free
total used free shared buffers cached
Mem: 2059576 1996232 63344 228 134648 1490472
-/+ buffers/cache: 371112 1688464
Swap: 775176 0 775176

7 REPLIES 7
Jeeshan
Honored Contributor

Re: My swap memory is not at all used.

what is your OS version?

post below kernel parameters value

1. max_queue_depth
2. dirty_ratio
3. swappiness
a warrior never quits
Sandeep_Chaudhary
Trusted Contributor

Re: My swap memory is not at all used.

No such parameter. It is redhat 7.2

slxde009# sysctl -A|grep -i swap
vm.kswapd = 512 32 8
[root@slxde009]:~
slxde009# sysctl -A|grep -i dirty
[root@slxde009]:~
slxde009# sysctl -A|grep -i max
dev.raid.speed_limit_max = 100000
net.unix.max_dgram_qlen = 10
net.ipv4.inet_peer_gc_maxtime = 120
net.ipv4.inet_peer_maxttl = 600
net.ipv4.igmp_max_memberships = 20
net.ipv4.route.max_size = 262144
net.ipv4.route.max_delay = 10
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_max_tw_buckets = 180000
net.ipv4.tcp_max_orphans = 32768
net.core.optmem_max = 10240
net.core.netdev_max_backlog = 300
net.core.rmem_max = 131071
net.core.wmem_max = 131071
vm.max-readahead = 31
vm.max_map_count = 65536
kernel.threads-max = 16383
kernel.msgmax = 8192
kernel.shmmax = 33554432
kernel.rtsig-max = 1024
fs.super-max = 256
fs.file-max = 8192
[root@slxde009]:~
slxde009# cat /etc/redhat-release
Red Hat Linux release 7.2 (Enigma)
Jeeshan
Honored Contributor

Re: My swap memory is not at all used.

i don't think you have to worry about this. coz your processes use mostly in physical memory. or may be the processes doesn't used the swap.

I have seen practically this kind of situation mostly, but doesn't cause any harm.

but you may observ your system closely, what is happening.
a warrior never quits
Fred Ruffet
Honored Contributor

Re: My swap memory is not at all used.

You don't have to worry at all. It's rather a good thing not to use swap. Memory usage is faster than disk. It's a normal behaviour.

In the free output you sent, you can see that most of the memory used is for cache. Kernel will keep things in this cache to speed-up things, but if memory is needed for a program, it will make some place in RAM for it.
--

"Reality is just a point of view." (P. K. D.)
Srimalik
Valued Contributor

Re: My swap memory is not at all used.

Fred is correct
Linux memory manager uses the free memory as cache to increase performance.

When an application is started the cache will be shrinked and application is given memory from the freed area. Its all dynamic. SO you need not worry. swap will not be used untill you are really out of physical memory.

Newer linux kernel provide you some control over this behaviour by the "swapiness" parameter. Google it and you will know.

-Sri
abandon all hope, ye who enter here..
dirk dierickx
Honored Contributor

Re: My swap memory is not at all used.

redhat 7.2? are you kidding? that was released close to 10 years ago!

anyway, you want your system to use swap? don't you know there is a serious performance impact associated with that.

linux doesn't use swap unless it really has to. be happy, it means more performance to you!
Sandeep_Chaudhary
Trusted Contributor

Re: My swap memory is not at all used.

No Problem!!