[uClinux-dev] limiting disk cache

Andrei Martynov andrei.martynov at web.de
Tue Feb 10 03:28:29 EST 2009


I'm using kernel 2.6.24 with uClinux and ARM NOMMU patches. When one
application starts reading from disk kernel uses all available memory
for caching and other applications fail to start (not enough memory).
It takes kernel up to 10 seconds to release memory after the first
application exits.

Is there any way to limit disk cache size?

Meminfo report (before starting the first application, 5 seconds after
application exit, 10 seconds after application exit)

/hdd # cat /proc/meminfo
MemTotal:        12900 kB 12900 kB   12900 kB
MemFree:          9840 kB  1280 kB   10240 kB
Buffers:            24 kB    24 kB      24 kB
Cached:            412 kB  8064 kB       0 kB
SwapCached:          0 kB     0 kB       0 kB
Active:            432 kB     0 kB       4 kB
Inactive:            0 kB  8060 kB      20 kB
SwapTotal:           0 kB     0 kB       0 kB
SwapFree:            0 kB     0 kB       0 kB
Dirty:               4 kB     0 kB       4 kB
Writeback:           0 kB     0 kB       0 kB
AnonPages:           0 kB     0 kB       0 kB
Mapped:              0 kB     0 kB       0 kB
Slab:             2440 kB  3348 kB    2452 kB
SReclaimable:      176 kB  1076 kB     184 kB
SUnreclaim:       2264 kB  2272 kB    2268 kB
PageTables:          0 kB     0 kB       0 kB
NFS_Unstable:        0 kB     0 kB       0 kB
Bounce:              0 kB     0 kB       0 kB
CommitLimit:      6448 kB  6448 kB    6448 kB
Committed_AS:        0 kB     0 kB       0 kB
VmallocTotal:        0 kB     0 kB       0 kB
VmallocUsed:         0 kB     0 kB       0 kB
VmallocChunk:        0 kB     0 kB       0 kB


-- 
Best regards,
 Andrei                          mailto:andrei.martynov at web.de




More information about the uClinux-dev mailing list