On Fri, 24 Dec 2004, Martin Marji Cermak wrote:

I guess it is normal Squid behaviour - the developers probably did not expect the storeDirWriteCleanLogs method to take so long to finish.

Correct.

When Squid is executing storeDirWriteCleanLogs, I believe it does not process its event queue.

Correct.

As you can see below, I got an extreme case when storeDirWriteCleanLogs took 23 seconds to finish.

Quite likely your Squid was partially swapped out and this caused the storeDirWriteCleanLogs to take such long time. You do not have very many entries to warrant that the writing in itself should take a noticeable amount of time.


I have to rotate my logfiles approx every hour (I use "log_mime_hdrs on" to be able to help a client when he/she has a problem, so access.log grows to 500MB after an hour in peek time).

Understandable.

Is there a way how to not affect clients when rotating logfiles?

Not easily.

Maybe the storeDirWriteCleanLogs does not have to be called just because of rotating? If so, I can make a patch, just need some hints before I start :-)

You need to periodically rotate/clean the swap.state index files just as you need to rotate the access.log. If not these will grow too large. But you probably does not need to clean the swap.state as frequently.


The rotate process is seen in main.c mainRotate(). The writing of the clean swap.state indexes is the storeDirWriteCleanLogs(1) call.

Regards
Henrik

Reply via email to