I have an embedded system with a low amount of memory. The system has allocation issues. Maybe due to fragmentation: Memory allocation issue on NOMMU? The platform is a NOMMU platform and so I suspect that the linux caching is the cause of this fragmentation. Maybe it is, maybe it isn't. The thing is, I can't really see what my system would gain from caching. The system is built from the following partitions:
- RAM partition. (Kernel, user space fs, etc.)
- SPI Flash. (Some config data. Maybe a few kb.)
- SD Card. (Logged data. Will never be read.)
Here's the output from my top command:
Mem: 23376K used, 5912K free, 0K shrd, 1624K buff, 8404K cached CPU: 10% usr 42% sys 0% nic 0% idle 47% io 0% irq 0% sirq Load average: 1.07 1.00 0.96 2/68 4299 ...
My system has 15M free ram when booted. Within a few minutes more than 60% is used for cache. Normally that wouldn't matter, except if it causing fragmentation issues due to NOMMU difficulties. Now, what is it that the kernel wants to cache anyway? The RAM partition? (Bit foolish.) The SPI Flash? (Good idea. But there's only a few kb there.) The SD card? (It doesn't need caching in this particular scenario.)
How do see what is being cached? And how do I reduce the caching scheme? (I really don't need that much caching. There's no gain.)
I've tried to mount the sd card and the spi flash with -o sync. But it doesn't make a difference.