Search squid archive

Re: reading swap.state file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/08/2013 10:45 p.m., Hussam Al-Tayeb wrote:
On Monday 05 August 2013 10:12:41 Amos Jeffries wrote:
On 5/08/2013 1:11 a.m., Hussam Al-Tayeb wrote:
how I can parse swap.state file for inconsistencies?
i.e. files referenced in swap.state but not in disk cache.
swap.state is a journal of transactions. It includes references to
operations that occured on old deleted files as part of its normal
content. Squid handles any such files without the delete record
automatically you do not need to worry about it.

Or files on disk but not referenced in swap.state. it seems squid does not
know how to shut down correctly if one of the users is viewing a youtube
video.
What do you mean by that last one? If Squid is shutting down it waits
shutdown_timeout for clients to finish up (a long video would not do so)
then terminates all remaining client connections and stops. None of them
get written to the log, and on restart the corrupted files will be
overwritten.

Amos
That's not the case here. I have not set shutdown_timeout so it should be the
default. now on kernel updates I need to restart the server.

sometimes I get more files on disk that cache.log says (this very rarely
happens).

And sometimes cache.log claims that swap.state has more referenced files than
actually on disk. This happens almost every single time I squid -k shutdown
then restart my server. Access.log file says the last thing being downloaded is
a youtube video.

My earlier description is what happens on shutdown. If you have not set shutdown_timeout yourself then the default of 30 seconds will be when the timeout stages happen that is all. The process *will* happen regardless of when the timeout occurs. Before the timeout Squid is simply waiting for existing clients to finish and clearing up as much disk I/O as possible. It is good to hear that the cache garbage is a rare event, that means your Squid is getting enough cycles on shutdown to finish the disk I/O erase events at least.

I expect that the swap.state claiming more files than exist is something to do with your OS caching disk I/O.

Amos




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux