0

Environment: a standby/idle running physical system with RHEL 6.9

Symptom: We have done some dd tests in order to observe the change of the buffers/cached size in the free -m cmd. After we had cleaned up the buffers & cache, the buffers were just empty whereas the cached was still with 111MB. And then the cached had increased about nearly 60MB when we dd the block devices.

Notes: We know that some storage metadatas e.g. superblocks would be stored in the buffers but not the caches

So my two sub-questions are the followings:

  1. Why would the cached column size still have 111MB after cleaning up the buffers & cache?
  2. Why would the cached column size "obviously" increase during the dd process with the block devices?
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      23673      72973          0      21233        759
-/+ buffers/cache:       1680      94966
Swap:        16383          0      16383
# 
# 
# 
# echo 3 > /proc/sys/vm/drop_caches
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646       1098      95547          0          0        111
-/+ buffers/cache:        986      95659
Swap:        16383          0      16383
# 
# 
# vmstat 1 6
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0    340 97844368    872 114688    1    1    61    22    0    0  1  0 99  0  0
 0  0    340 97844496    872 114748    0    0     8     0 1046  282  0  0 100  0  0
 0  0    340 97844496    872 114748    0    0     8     1 1041  245  0  0 100  0  0
 0  0    340 97844656    872 114748    0    0     8     0 1043  248  0  0 100  0  0
 0  0    340 97844656    872 114748    0    0     8     1 1038  255  0  0 100  0  0
 0  1    340 97844536    900 114728    0    0     0    88 1038  312  0  0 94  6  0
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646       1097      95548          0          0        111
-/+ buffers/cache:        984      95661
Swap:        16383          0      16383
# 
# 
# 
# vmstat 1 6
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0    340 97844032    924 114724    1    1    61    22    0    0  1  0 99  0  0
 0  0    340 97844256    924 114744    0    0     8     0 1051  240  0  0 100  0  0
 0  0    340 97844320    924 114748    0    0     8     1 1040  262  0  0 100  0  0
 0  0    340 97844192    924 114748    0    0     8     0 1085  387  0  0 100  0  0
 0  0    340 97844320    924 114748    0    0     8     1 1042  278  0  0 100  0  0
 0  0    340 97844336    948 114724    0    0     8    88 1050  382  0  0 100  0  0
# 
# 
# 
#   
# nohup dd if=/dev/mapper/vgroot-Lvopenv of=/dev/mapper/vgroot-test_d1 skip=1000 bs=512k &
[1] 31265
# nohup: appending output to `nohup.out'

# 
# 
# vmstat 1 6
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0    340 95727896 2003476 175072    1    1    61    22    0    0  1  0 99  0  0
 0  1    340 95206576 2511252 175320    0    0 253704     1 2037 2228  0  7 86  7  0
 0  1    340 94687136 3017104 175248    0    0 252932     0 2028 2249  0  7 87  5  0
 1  0    340 94162088 3528332 175184    0    0 255748    13 2769 3694  0  7 88  5  0
 1  1    340 93647632 4029624 175316    0    0 250792    32 2090 2361  0  7 87  6  0
 0  1    340 93156560 4507884 175300    0    0 239060    53 3246 4805  0  7 84  9  0
# 
# 
# 
# vmstat 1 16
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  1    340 91163136 6448656 175376    1    1    61    22    0    0  1  0 99  0  0
 0  1    340 90679296 6918568 175328    0    0 235016    84 3089 4673  0  7 82 10  0
 1  0    340 90181824 7403024 175372    0    0 242312     1 1992 2139  0  7 81 12  0
 0  1    340 89652680 7918120 175352    0    0 257416     0 2052 2285  0  7 88  5  0
 0  1    340 89132208 8424744 174992    0    0 253448     1 2075 2370  0  7 87  5  0
 1  0    340 88643328 8900780 175212    0    0 238088     0 1988 2108  0  7 88  6  0
 0  1    340 88139840 9391552 175028    0    0 245132   109 3326 4918  0  7 85  8  0
 0  1    340 87653032 9865536 175032    0    0 236928    28 3286 4714  0  7 84  9  0
 1  0    340 87162032 10343672 175088    0    0 239168     1 1996 2135  0  7 88  6  0
 1  1    340 86628672 10862840 175244    0    0 259464     0 2062 2269  0  7 87  5  0
 0  1    340 86111256 11366648 175280    0    0 251912     1 2027 2203  0  7 88  5  0
 0  1    340 85647328 11818128 175116    0    0 225672    76 3178 4722  0  7 84  9  0
 1  0    340 85119456 12331920 175352    0    0 257036     1 2045 2266  0  7 88  5  0
 1  1    340 84605016 12832912 175108    0    0 250628     0 2023 2223  0  7 87  5  0
 0  1    340 84103872 13320768 175124    0    0 243976     1 1996 2143  0  7 87  6  0
 1  0    340 83574232 13836432 175068    0    0 257800     0 2055 2257  0  7 88  5  0
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      18136      78509          0      16535        171
-/+ buffers/cache:       1430      95215
Swap:        16383          0      16383
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      19348      77297          0      17714        171
-/+ buffers/cache:       1463      95182
Swap:        16383          0      16383
# 
# 
# 
# vmstat 1 8
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  1    340 76894032 20335952 175340    1    1    61    22    0    0  1  0 99  0  0
 0  1    340 76765144 20462952 175320    0    0 63504 62141 2936 3832  0  3 83 13  0
 0  2    340 76542304 20675944 174984    0    0 106504 100072 4100 6171  0  5 86  9  0
 0  1    340 76384016 20831592 174540    0    0 77832 86633 3442 4367  0  5 74 21  0
 1  2    340 76203216 21006304 174852    0    0 87560 63616 3575 5025  0  4 80 16  0
 2  0    340 75999744 21205200 174716    0    0 99464 109757 4353 4825  0  6 69 25  0
 0  1    340 75887632 21317888 174624    0    0 56072 66444 2902 3058  0  4 67 30  0
 1  0    340 75776488 21427168 174860    0    0 54832 53877 2462 2719  0  3 86 11  0
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      23456      73190          0      21710        171
-/+ buffers/cache:       1574      95071
Swap:        16383          0      16383
# 
# 
# 
# vmstat 1 8
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  2    340 73209824 23919680 174788    1    1    61    22    0    0  1  0 99  0  0
 0  3    340 73024896 24100928 175080    0    0 90640 58949 3819 4529  0  4 70 26  0
 1  2    340 72831408 24288564 174660    0    0 93972 116933 4019 5393  0  5 71 23  0
 0  5    340 72720272 24396836 175212    0    0 53980 48204 2674 3136  0  3 67 30  0
 0  1    340 72571424 24543292 174976    0    0 73224 114093 3475 3974  0  5 66 29  0
 0  1    340 72448096 24663100 174936    0    0 59912 62160 2826 3558  0  3 87 10  0
 2  0    340 72315760 24791336 174712    0    0 64264 64189 2990 3924  0  3 87 10  0
 1  0    340 72151496 24952988 175168    0    0 80784 80852 3604 4461  0  5 78 17  0
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      26734      69911          0      24901        170
-/+ buffers/cache:       1662      94983
Swap:        16383          0      16383
# 
# 
# 
# vmstat 1 8
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  1    340 64158176 32734544 175056    1    1    61    22    0    0  1  0 99  0  0
 1  1    340 63928852 32954576 175112    0    0 110216 91508 4238 6208  0  5 79 16  0
 2  2    340 63731188 33147344 174416    0    0 96392 65021 4082 5205  0  5 69 27  0
 0  2    340 63559684 33315152 175000    0    0 83720 57344 3594 4304  0  4 73 23  0
 2  4    340 63375412 33494368 174696    0    0 89736 53849 3797 4833  0  4 60 37  0
 0  2    340 63287548 33580396 175388    0    0 42888 155148 2723 2397  0  5 74 21  0
 1  1    340 63205204 33662312 175368    0    0 41096 41445 2235 2548  0  2 75 23  0
 0  1    340 63015216 33847664 175244    0    0 92552 94760 3939 5725  0  5 78 18  0
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      36143      60502          0      34060        170
-/+ buffers/cache:       1912      94733
Swap:        16383          0      16383
# 
# 
# 
# vmstat 1 8
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  3    340 58571068 38169084 175056    1    1    61    22    0    0  1  0 99  0  0
 0  1    340 58416972 38323708 174736    0    0 77320 99065 3467 3472  0  5 78 17  0
 0  3    340 58350100 38389268 175332    0    0 32776 29044 1946 2020  0  2 62 36  0
 0  1    340 58184636 38550036 175160    0    0 80392 78693 3303 4483  0  4 86 10  0
 0  1    340 58022008 38707732 175244    0    0 78856 82880 3281 4339  0  4 87 10  0
 0  1    340 57873524 38853140 175500    0    0 72712 70449 3134 4027  0  4 87 10  0
 0  1    340 57742212 38981140 175248    0    0 64008 62160 2847 3613  0  3 87 10  0
 0  1    340 57556304 39161388 174828    0    0 90120 91193 3542 4991  0  4 78 17  0
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      42214      54431          0      39966        171
-/+ buffers/cache:       2077      94568
Swap:        16383          0      16383
# 
# 
# 
[1]+  Done                    nohup dd if=/dev/mapper/vgroot-Lvopenv of=/dev/mapper/vgroot-test_d1 skip=1000 bs=512k
# 
# 
# 
# vmstat 1 8
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0    340 76560704 20466772 175368    1    1    61    22    0    0  1  0 99  0  0
 0  0    340 76560704 20466772 175368    0    0     8     1 1049  249  0  0 93  7  0
 0  0    340 76560688 20466772 175368    0    0     8     0 1086  393  0  0 100  0  0
 0  0    340 76560432 20466796 175356    0    0     8    85 1053  387  0  0 100  0  0
 0  0    340 76560720 20466796 175368    0    0     8   104 1060  256  0  0 100  0  0
 0  0    340 76560720 20466796 175368    0    0     8     1 1052  249  0  0 100  0  0
 0  0    340 76560856 20466796 175368    0    0     8     0 1042  242  0  0 100  0  0
 0  0    340 76560856 20466796 175368    0    0     8     1 1045  280  0  0 100  0  0
# 
# 
# 
# free -m
             total       used       free     shared    buffers     cached
Mem:         96646      21879      74766          0      19987        171
-/+ buffers/cache:       1721      94925
Swap:        16383          0      16383
# 
# 

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.