On Sat, 16 Sep 2000, Byron Stanoszek wrote:

> I think I might have a similar problem with 2.4.0-t8-vmpatch2, related to
> caching. Without the vmpatch, my standard system 'used' would be near 28mb
> actual in use, the rest cached or in buffers. When I tried vmpatch2, standard
> usage eventually got up to 44mb when using the same programs and processes,
> with 1600kb of buffers and about 78mb of cache (with 2 days of uptime).
> 
> Then I tried a: find / -name *.pdf
> 
> The size of the buffers increased to 16mb as expected, but also the amount of
> memory 'in use' also increased by 16mb! Free shows:
> 
>              total       used       free     shared    buffers     cached
> Mem:        126516     123312       3204          0      16496      46084
> -/+ buffers/cache:      60732      65784
> Swap:        32124          0      32124
> 
> That 60732 figure used to be around 44000 before the 'find'.

Here's a follow-up, using 2.4.0-test9 (without 2.4.0-t9-vmpatch).

I rebooted my system into 2.4.0-test9 and started my usual number of processes.
The memory map looks like this:

root:~> cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  129552384 69799936 59752448        0  1654784 34791424
Swap: 32894976        0 32894976
MemTotal:       126516 kB
MemFree:         58352 kB
MemShared:           0 kB
Buffers:          1616 kB
Cached:          33976 kB
Active:          21668 kB
Inact_dirty:     13924 kB
Inact_clean:         0 kB
Inact_target:      392 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       126516 kB
LowFree:         58352 kB
SwapTotal:       32124 kB
SwapFree:        32124 kB
root:~> free
             total       used       free     shared    buffers     cached
Mem:        126516      68172      58344          0       1616      33976
-/+ buffers/cache:      32580      93936
Swap:        32124          0      32124


After about 1 minute of doing nothing, I tried it again, and it showed:

root:~> cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  129552384 69636096 59916288        0  1654784 34820096
Swap: 32894976        0 32894976
MemTotal:       126516 kB
MemFree:         58512 kB
MemShared:           0 kB
Buffers:          1616 kB
Cached:          34004 kB
Active:          11704 kB
Inact_dirty:     23916 kB
Inact_clean:         0 kB
Inact_target:      184 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       126516 kB
LowFree:         58512 kB
SwapTotal:       32124 kB
SwapFree:        32124 kB
root:~> free
             total       used       free     shared    buffers     cached
Mem:        126516      68028      58488          0       1616      34004
-/+ buffers/cache:      32408      94108
Swap:        32124          0      32124

# Active pages decreased, # inactive_dirty pages increased.


Then I did the 'find'. This is the state of memory after the 'find' ended:

root:~> cat /proc/meminfo; free
        total:    used:    free:  shared: buffers:  cached:
Mem:  129552384 99676160 29876224        0 17022976 34881536
Swap: 32894976        0 32894976
MemTotal:       126516 kB
MemFree:         29176 kB
MemShared:           0 kB
Buffers:         16624 kB
Cached:          34064 kB
Active:          18688 kB
Inact_dirty:     18892 kB
Inact_clean:     13108 kB
Inact_target:      236 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       126516 kB
LowFree:         29176 kB
SwapTotal:       32124 kB
SwapFree:        32124 kB
             total       used       free     shared    buffers     cached
Mem:        126516      97352      29164          0      16624      34064
-/+ buffers/cache:      46664      79852
Swap:        32124          0      32124

Active pages increased to 18688kB, and we see some inact_clean. Is this normal
as intended? So after writing this, I began to think that the 'free' command
should look at the number of 'Active' pages to determine how much memory is
actually 'in use' by system processes. Then just for fun, I looked at
/proc/meminfo again and saw this:

root:~> cat /proc/meminfo; free
        total:    used:    free:  shared: buffers:  cached:
Mem:  129552384 101093376 28459008        0 17039360 36040704
Swap: 32894976        0 32894976
MemTotal:       126516 kB
MemFree:         27792 kB
MemShared:           0 kB
Buffers:         16640 kB
Cached:          35196 kB
Active:           3128 kB
Inact_dirty:     35704 kB
Inact_clean:     13004 kB
Inact_target:       20 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       126516 kB
LowFree:         27792 kB
SwapTotal:       32124 kB
SwapFree:        32124 kB
             total       used       free     shared    buffers     cached
Mem:        126516      98732      27784          0      16640      35196
-/+ buffers/cache:      46896      79620
Swap:        32124          0      32124

Number of active pages decreased to 3 meg. Ok.  So, what value should I use to
determine what actually is in-use by processes. Obviously, 'free' doesn't give
the correct results anymore. :)

 -Byron

-- 
Byron Stanoszek                         Ph: (330) 644-3059
Systems Programmer                      Fax: (330) 644-8110
Commercial Timesharing Inc.             Email: [EMAIL PROTECTED]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to