Show Posts
|
|
Pages: 1 2 3 [4] 5 6 7
|
|
46
|
General Category / General Discussion / Re: Ways to save ram usage
|
on: January 01, 2010, 05:35:03 PM
|
|
Most of that is cached and shared anyway.
And a lot of it has to do with what libraries your applications are compiled for. Glibc is a massive, bloated hog. Most people could use the trimmed down uclibc. Everything you see there could get away with using 64MB very well and have plenty left over.
Also, protected mode memory allows more memory than exists to be mapped. Applications need to tell the kernel how much memory they need before its used, otherwise currently used areas could be clobbered. Its easy to ask for more than you need now than to go over budget later.
|
|
|
|
|
47
|
General Category / General Discussion / Re: pdflush and syslogd 100% CPU usage
|
on: January 01, 2010, 05:20:50 PM
|
|
From my experience, the slow storage device might have been mounted synchronously, or some log files might have the sync file attribute set. That means the writes are immediate. Good for log files when debugging crashes, because the last events before impending doom are saved. Bad for slow sdcards!
You can tune the kernel to flush every minute, hour, day, or never. Check to see how often:
cat /proc/sys/vm/dirty_writeback_centisecs
and if its 500, you can increase it to 50000 by "cat 50000 > /proc/sys/vm/dirty_writeback_centisecs"
and give your storage systems a rest. But if the power ever goes out without a "sync" command, massive data is lost.
You can also check the mounted file systems for the any sync options by checking /etc/mtab:
cat /etc/mtab
You can check the rarely used, but sneaky file attributes with lsattr and set them from chattr...
from "man chattr" "When a file with the `S' attribute set is modified, the changes are written synchronously on the disk; this is equivalent to the `sync' mount option applied to a subset of the files.
All kinds of ways to tune the system and make it fast or force data updates.
|
|
|
|
|