[SOLVED] Mageia7 not utilizing free physical mem 4 diskcache

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Mageia7 not utilizing free physical mem 4 diskcache

Postby sleepyz » Aug 9th, '19, 21:52

Recently did some updates to system and noticed that very little free memory is allocated to disk cache even though I have much physical memory free available
Code: Select all
@i5Rig ~]$ free -lm
              total        used        free      shared  buff/cache   available
Mem:          16007        2114       12401          42        1491       13550
Low:          16007        3605       12401
High:             0           0           0
Swap:          9992           0        9992

Code: Select all
i5Rig ~]$ cat /proc/sys/vm/min_free_kbytes
67584

Code: Select all
@i5Rig ~]$ cat /proc/meminfo
MemTotal:       16391828 kB
MemFree:        12677428 kB
MemAvailable:   13861512 kB
Buffers:          133624 kB
Cached:          1292084 kB
SwapCached:            0 kB
Active:          2379476 kB
Inactive:         831340 kB
Active(anon):    1786344 kB
Inactive(anon):    45068 kB
Active(file):     593132 kB
Inactive(file):   786272 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:      10232372 kB
SwapFree:       10232372 kB
Dirty:              1716 kB
Writeback:             0 kB
AnonPages:       1785120 kB
Mapped:           579044 kB
Shmem:             46336 kB
KReclaimable:     112620 kB
Slab:             236240 kB
SReclaimable:     112620 kB
SUnreclaim:       123620 kB
KernelStack:       11104 kB
PageTables:        27552 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    18428284 kB
Committed_AS:    8581312 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Percpu:             1744 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      380444 kB
DirectMap2M:    16363520 kB
Attachments
kinfocenter.png
Kinfocenter Memory Information
kinfocenter.png (387.09 KiB) Viewed 1133 times
Last edited by sleepyz on Aug 13th, '19, 05:07, edited 2 times in total.
Linux 5.3.6-desktop-1.mga7 (gcc version 8.3.1 (Mageia 8.3.1-0.mga7)) 2019 GeForce GTX 760 OpenGL 4.6.0 NVIDIA 430.40 i5-3450 3.50GHz 16GB DDR3 240GB SSD, 1TB HD, 1xBR-RE Mageia:7 64bit KDE Plasma :5.15.4 KDE Framework:5.57.0 Qt:5.12.2 Kernel:5.3.6
sleepyz
 
Posts: 26
Joined: Jan 10th, '18, 23:46
Location: US

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby martinw » Aug 10th, '19, 00:03

That just shows how much memory is currently being used for the cache. Try running something that reads a lot of data from disk, and you will see the number go up.
martinw
 
Posts: 609
Joined: May 14th, '11, 10:59

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby sleepyz » Aug 10th, '19, 00:22

I have run two virtualbox sessions, 1 windows 10 allocated with 4GB RAM and 30GB vdi image file and 1 windows 8 alllocated with 3GB RAM and 35GB vdi image file.
Code: Select all
@i5Rig ~]$ free -lm
              total        used        free      shared  buff/cache   available
Mem:          16007       12789         859         210        2358        2680
Low:          16007       15148         859
High:             0           0           0
Swap:          9992           0        9992


Code: Select all
@i5Rig ~]$ cat /proc/meminfo
MemTotal:       16391828 kB
MemFree:          635524 kB
MemAvailable:    2648932 kB
Buffers:           64380 kB
Cached:          2283612 kB
SwapCached:           92 kB
Active:          5334776 kB
Inactive:        1849244 kB
Active(anon):    4220924 kB
Inactive(anon):   824648 kB
Active(file):    1113852 kB
Inactive(file):  1024596 kB
Unevictable:         252 kB
Mlocked:             252 kB
SwapTotal:      10232372 kB
SwapFree:       10231860 kB
Dirty:             11124 kB
Writeback:             0 kB
AnonPages:       4836224 kB
Mapped:          9026704 kB
Shmem:            211936 kB
KReclaimable:     211060 kB
Slab:             448132 kB
SReclaimable:     211060 kB
SUnreclaim:       237072 kB
KernelStack:       20464 kB
PageTables:        71364 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    18428284 kB
Committed_AS:   23427828 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Percpu:             1840 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:     1506844 kB
DirectMap2M:    15237120 kB
Attachments
Kinfocenter.png
Kinfocenter Memory Information
Kinfocenter.png (366.59 KiB) Viewed 1119 times
Linux 5.3.6-desktop-1.mga7 (gcc version 8.3.1 (Mageia 8.3.1-0.mga7)) 2019 GeForce GTX 760 OpenGL 4.6.0 NVIDIA 430.40 i5-3450 3.50GHz 16GB DDR3 240GB SSD, 1TB HD, 1xBR-RE Mageia:7 64bit KDE Plasma :5.15.4 KDE Framework:5.57.0 Qt:5.12.2 Kernel:5.3.6
sleepyz
 
Posts: 26
Joined: Jan 10th, '18, 23:46
Location: US

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby sleepyz » Aug 10th, '19, 00:27

On my other Mageia System it looks like this with hardly any programs running
Attachments
Kinfocenter-othersystem.png
Other System with minimal programs running
Kinfocenter-othersystem.png (382.88 KiB) Viewed 1119 times
Linux 5.3.6-desktop-1.mga7 (gcc version 8.3.1 (Mageia 8.3.1-0.mga7)) 2019 GeForce GTX 760 OpenGL 4.6.0 NVIDIA 430.40 i5-3450 3.50GHz 16GB DDR3 240GB SSD, 1TB HD, 1xBR-RE Mageia:7 64bit KDE Plasma :5.15.4 KDE Framework:5.57.0 Qt:5.12.2 Kernel:5.3.6
sleepyz
 
Posts: 26
Joined: Jan 10th, '18, 23:46
Location: US

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby martinw » Aug 10th, '19, 00:35

So you've read more data from disk on that system.

As you read data from disk, it gets cached in free memory. Linux will use all the free memory for this purpose, but as soon as the memory is needed for some other purpose, the oldest data will be discarded and the memory used by the cache will shrink accordingly.
martinw
 
Posts: 609
Joined: May 14th, '11, 10:59

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby sleepyz » Aug 10th, '19, 00:36

After I closed the virtual guest OSs down it did increase the disk cache to 26 percent. So I guess its doing what its supposed to do. But just wonder why my other system has such a high disk cache compared to this on. Isn't memory not used is memory wasted?
Attachments
Kinfocenter-2.png
After Closing Virtual Guest OSs down
Kinfocenter-2.png (385.19 KiB) Viewed 1119 times
Linux 5.3.6-desktop-1.mga7 (gcc version 8.3.1 (Mageia 8.3.1-0.mga7)) 2019 GeForce GTX 760 OpenGL 4.6.0 NVIDIA 430.40 i5-3450 3.50GHz 16GB DDR3 240GB SSD, 1TB HD, 1xBR-RE Mageia:7 64bit KDE Plasma :5.15.4 KDE Framework:5.57.0 Qt:5.12.2 Kernel:5.3.6
sleepyz
 
Posts: 26
Joined: Jan 10th, '18, 23:46
Location: US

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby ITA84 » Aug 12th, '19, 09:20

From what I can see, your other system has only 8 GB of RAM, so the difference isn't all that much. I remember my older systems having more disk cache than what I have now, but that was because 1) there was a readahead service (which apparently isn't used anymore) and 2) several programs, including some file indexers, i don't run anymore, so it could just be a difference in the stuff that's installed on your two systems
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby martinw » Aug 12th, '19, 09:56

As already explained, the size of the disk cache is the amount of data currently cached, not the maximum size. Try a test like this:
Code: Select all
% free -m
              total        used        free      shared  buff/cache   available
Mem:          14014         712       12687          10         613       13005
Swap:         16383           0       16383
% cat Mageia-7.1-i586/Mageia-7.1-i586.iso > /dev/null
% free -m
              total        used        free      shared  buff/cache   available
Mem:          14014         713        8470          10        4830       13000
Swap:         16383           0       16383
% cat Mageia-7.1-x86_64/Mageia-7.1-x86_64.iso > /dev/null
% free -m
              total        used        free      shared  buff/cache   available
Mem:          14014         713        4166          10        9134       12995
Swap:         16383           0       16383
% cat Mageia-7.1-Live-GNOME-x86_64/Mageia-7.1-Live-GNOME-x86_64.iso > /dev/null
% free -m
              total        used        free      shared  buff/cache   available
Mem:          14014         712        1582          10       11719       12993
Swap:         16383           0       16383
% cat Mageia-7.1-Live-Plasma-x86_64/Mageia-7.1-Live-Plasma-x86_64.iso > /dev/null
% free -m
              total        used        free      shared  buff/cache   available
Mem:          14014         699         163          10       13150       13005
Swap:         16383           0       16382
% libreoffice
% free -m
              total        used        free      shared  buff/cache   available
Mem:          14014         705         210          10       13099       12999
Swap:         16383           0       16382

Use any large files you have on your system instead of the ISO files I used. Start a few more programs that consume a lot of memory to see the disk cache shrink further.
martinw
 
Posts: 609
Joined: May 14th, '11, 10:59

Re: Mageia 7 not utilizing free physical memory for disk cac

Postby sleepyz » Aug 13th, '19, 05:00

I tried your suggestion and I come to conclude that my system is working properly. Thank you very much for you time and help

Code: Select all
@i5rig Mageia-7-x86_64]$ free -m
              total        used        free      shared  buff/cache   available
Mem:          16007        5420        3067         173        7519       10145
Swap:          9992           0        9992
[frank@i5rig Mageia-7-x86_64]$ cat Mageia-7-x86_64.iso > /dev/null
[frank@i5rig Mageia-7-x86_64]$ free -m
              total        used        free      shared  buff/cache   available
Mem:          16007        5380         170         172       10456       10128
Swap:          9992           1        9990
Attachments
Kinfocneter-Memory_Information.png
Before cat command
Kinfocneter-Memory_Information.png (401.98 KiB) Viewed 1037 times
Kinfocneter-Memory_Information-2.png
After
Kinfocneter-Memory_Information-2.png (595.73 KiB) Viewed 1037 times
Linux 5.3.6-desktop-1.mga7 (gcc version 8.3.1 (Mageia 8.3.1-0.mga7)) 2019 GeForce GTX 760 OpenGL 4.6.0 NVIDIA 430.40 i5-3450 3.50GHz 16GB DDR3 240GB SSD, 1TB HD, 1xBR-RE Mageia:7 64bit KDE Plasma :5.15.4 KDE Framework:5.57.0 Qt:5.12.2 Kernel:5.3.6
sleepyz
 
Posts: 26
Joined: Jan 10th, '18, 23:46
Location: US

Re: [SOLVED] Mageia7 not utilizing free physical mem 4 diskc

Postby sleepyz » Aug 13th, '19, 05:12

Just want to say to the people of Mageia.. I really love your product since your fork from Mandrivia.
Linux 5.3.6-desktop-1.mga7 (gcc version 8.3.1 (Mageia 8.3.1-0.mga7)) 2019 GeForce GTX 760 OpenGL 4.6.0 NVIDIA 430.40 i5-3450 3.50GHz 16GB DDR3 240GB SSD, 1TB HD, 1xBR-RE Mageia:7 64bit KDE Plasma :5.15.4 KDE Framework:5.57.0 Qt:5.12.2 Kernel:5.3.6
sleepyz
 
Posts: 26
Joined: Jan 10th, '18, 23:46
Location: US


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest