[squid-users] long rotate logs time, drop-outs for clients?

From: Martin Marji Cermak <[email protected]>
Date: Fri, 24 Dec 2004 10:55:34 +0800

Hello Guys,
I suspect that my Squid is not serving requests while it is rotating its
log files.
I guess it is normal Squid behaviour - the developers probably did not
expect the storeDirWriteCleanLogs method to take so long to finish.

When Squid is executing storeDirWriteCleanLogs, I believe it does not
process its event queue.
As you can see below, I got an extreme case when storeDirWriteCleanLogs
took 23 seconds to finish.
The event queue were not processed.
Any requests made by clients during this time were postponed.
Am I right?

Aside of the fact the clients experience time-outs / breaks (I'll have
to test it to know what is going on while Squid is rotating logfiles),
there is the problem with the event queue.

I use a WCCP router with Squid. The problem is that the WCCP router
starts thinking the Squid is dead, because Squid has not sent the
I_AM_HERE message (scheduled every 10 seconds using the event queue) for
long 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).

Is there a way how to not affect clients when rotating logfiles?
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 :-)

Some config parameters and stats below.
Have a lovely Xmas!
Marji

-------------------------------------------------------------

2004/12/22 06:31:01| storeDirWriteCleanLogs: Starting...
2004/12/22 06:31:03| 65536 entries written so far.
2004/12/22 06:31:04| 131072 entries written so far.
2004/12/22 06:31:04| 196608 entries written so far.
2004/12/22 06:31:05| 262144 entries written so far.
2004/12/22 06:31:05| 327680 entries written so far.
2004/12/22 06:31:06| 393216 entries written so far.
2004/12/22 06:31:06| 458752 entries written so far.
2004/12/22 06:31:06| 524288 entries written so far.
2004/12/22 06:31:06| 589824 entries written so far.
2004/12/22 06:31:07| 655360 entries written so far.
2004/12/22 06:31:07| 720896 entries written so far.
2004/12/22 06:31:08| 786432 entries written so far.
2004/12/22 06:31:09| 851968 entries written so far.
2004/12/22 06:31:09| 917504 entries written so far.
2004/12/22 06:31:09| 983040 entries written so far.
2004/12/22 06:31:10| 1048576 entries written so far.
2004/12/22 06:31:10| 1114112 entries written so far.
2004/12/22 06:31:10| 1179648 entries written so far.
2004/12/22 06:31:10| 1245184 entries written so far.
2004/12/22 06:31:10| 1310720 entries written so far.
2004/12/22 06:31:10| 1376256 entries written so far.
2004/12/22 06:31:10| 1441792 entries written so far.
2004/12/22 06:31:11| 1507328 entries written so far.
2004/12/22 06:31:11| 1572864 entries written so far.
2004/12/22 06:31:11| 1638400 entries written so far.
2004/12/22 06:31:11| 1703936 entries written so far.
2004/12/22 06:31:11| 1769472 entries written so far.
2004/12/22 06:31:11| 1835008 entries written so far.
2004/12/22 06:31:11| 1900544 entries written so far.
2004/12/22 06:31:12| 1966080 entries written so far.
2004/12/22 06:31:12| 2031616 entries written so far.
2004/12/22 06:31:12| 2097152 entries written so far.
2004/12/22 06:31:12| 2162688 entries written so far.
2004/12/22 06:31:12| 2228224 entries written so far.
2004/12/22 06:31:14| 2293760 entries written so far.
2004/12/22 06:31:14| 2359296 entries written so far.
2004/12/22 06:31:14| 2424832 entries written so far.
2004/12/22 06:31:14| 2490368 entries written so far.
2004/12/22 06:31:14| 2555904 entries written so far.
2004/12/22 06:31:14| 2621440 entries written so far.
2004/12/22 06:31:14| 2686976 entries written so far.
2004/12/22 06:31:14| 2752512 entries written so far.
2004/12/22 06:31:14| 2818048 entries written so far.
2004/12/22 06:31:15| 2883584 entries written so far.
2004/12/22 06:31:15| 2949120 entries written so far.
2004/12/22 06:31:15| 3014656 entries written so far.
2004/12/22 06:31:15| 3080192 entries written so far.
2004/12/22 06:31:15| 3145728 entries written so far.
2004/12/22 06:31:15| 3211264 entries written so far.
2004/12/22 06:31:15| 3276800 entries written so far.
2004/12/22 06:31:16| 3342336 entries written so far.
2004/12/22 06:31:16| 3407872 entries written so far.
2004/12/22 06:31:16| 3473408 entries written so far.
2004/12/22 06:31:16| 3538944 entries written so far.
2004/12/22 06:31:16| 3604480 entries written so far.
2004/12/22 06:31:16| 3670016 entries written so far.
2004/12/22 06:31:16| 3735552 entries written so far.
2004/12/22 06:31:16| 3801088 entries written so far.
2004/12/22 06:31:16| 3866624 entries written so far.
2004/12/22 06:31:17| 3932160 entries written so far.
2004/12/22 06:31:17| 3997696 entries written so far.
2004/12/22 06:31:17| 4063232 entries written so far.
2004/12/22 06:31:17| 4128768 entries written so far.
2004/12/22 06:31:17| 4194304 entries written so far.
2004/12/22 06:31:17| 4259840 entries written so far.
2004/12/22 06:31:20| 4325376 entries written so far.
2004/12/22 06:31:20| 4390912 entries written so far.
2004/12/22 06:31:20| 4456448 entries written so far.
2004/12/22 06:31:21| 4521984 entries written so far.
2004/12/22 06:31:21| 4587520 entries written so far.
2004/12/22 06:31:21| 4653056 entries written so far.
2004/12/22 06:31:21| 4718592 entries written so far.
2004/12/22 06:31:21| 4784128 entries written so far.
2004/12/22 06:31:21| 4849664 entries written so far.
2004/12/22 06:31:21| 4915200 entries written so far.
2004/12/22 06:31:21| 4980736 entries written so far.
2004/12/22 06:31:21| 5046272 entries written so far.
2004/12/22 06:31:21| 5111808 entries written so far.
2004/12/22 06:31:21| 5177344 entries written so far.
2004/12/22 06:31:21| 5242880 entries written so far.
2004/12/22 06:31:22| Finished. Wrote 5284018 entries.
2004/12/22 06:31:22| Took 19.7 seconds (267642.6 entries/sec).
2004/12/22 06:31:22| logfileRotate: /usr/local/squid/var/logs/store.log
2004/12/22 06:31:24| Func: wccpRemovalQuery: Called

cache_dir aufs /cache/cache1 28000 60 256
cache_dir aufs /cache/cache2 56000 60 256
cache_dir aufs /cache/cache3 28000 60 256
cache_dir aufs /cache/cache4 28000 60 256

maximum_object_size 200 MB (I want max HitByteRatio)
cache_replacement_policy heap LFUDA
store_avg_object_size 22 KB (yes, I have 23.21 KB at the moment)
log_mime_hdrs on
cache_mem 200 MB (to relieve a bit to disks)

Storage Swap Size (at 2004/12/22 06:31:24) 115GB, not full yet
Peak Client HTTP Requests per second: 200
Peak HTTP In/Out Bytes: 2 MB/sec
Received on Thu Dec 23 2004 - 19:54:57 MST

This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:03 MST