Size of /var/log/messages vs. Size of cached

This is a discussion on Size of /var/log/messages vs. Size of cached within the Embedded forums, part of the Help category; Is there a correlation between the size of the /var/log/messages file and the amount reported as "cached" when the top utility is run? I see that if I put a ...

Go Back   Unix Linux Forum > Unix > Linux > Help > Embedded

FixUnix.com - Unix Linux Forums

Unix Content Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-20-2008, 09:53 PM
Default Size of /var/log/messages vs. Size of cached

Is there a correlation between the size of the /var/log/messages file
and the amount reported as "cached" when the top utility is run? I
see that if I put a lot of log messages in the /var/log/messages file
that the amount cached directly increases. If I then remove the /var/
log/messages file, the amount cached does not decrease.

Is this the expected behavior? In general, is there a way to keep the
amount cached down? I notice my system crashing when the amount
cached reaches a certain amount.

I am running Linux 2.6.10 on PowerPC.
Reply With Quote
  #2  
Old 08-21-2008, 05:58 AM
Default Re: Size of /var/log/messages vs. Size of cached

Bill writes:
>Is there a correlation between the size of the /var/log/messages file
>and the amount reported as "cached" when the top utility is run? I
>see that if I put a lot of log messages in the /var/log/messages file
>that the amount cached directly increases.


"Cached" refers to file data that's cached in RAM, so if you write a
lot to a file, the cached file data will increase (unless there is
something else competing for RAM). So yes, writing to
/var/log/messages will tend to increase the amount cached; but
normally the amount written to /var/log/messages is small compared to
the cache size.

>If I then remove the /var/
>log/messages file, the amount cached does not decrease.


Probably the syslogd still has the file open, so it's not really
deleted, just unlinked.

>Is this the expected behavior? In general, is there a way to keep the
>amount cached down?


Start a memory-intensive application that does not access files.

> I notice my system crashing when the amount
>cached reaches a certain amount.


That's a bug in your kernel. As others have mentioned, try something
more recent if possible.

- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
Reply With Quote
Reply

Thread Tools


All times are GMT -5. The time now is 10:38 AM.

In an effort to better serve ads to our visitors, cookies are used on Fixunix.com. For more information, check out our Privacy Policy.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Ad Management by RedTyger