squidnt+rejik
Добавлено: Чт май 27, 2010 11:39
Доброго всем времени суток!
Возникла следующая проблема:
Установлен и работает squidNT 2.7 STABLE 8. Из-за чрезмерного желания пользователей поразвлекаться, подключил к сквиду rejik 3.2.6 for Windows для начала с простым баном на odnoklassniki и vkontakte. При запуске squid создаются 5 процессов redirector.exe. Один из них процессорного времени не занимают, остальные 4 делят между собой все свободное процессорное время - загрузка 100% и на squid времени не остается. Загрузка процессора держится, пока не начнешь убивать процессы вручную. Как только процессов остается 2, все приходит в норму и начинает нормально работать. Если изначалбно url_rewrite children установить равным 2, при запуске сквида кратковременно нагрузка второго процесса редиректора поднимается до 100%, а затем падает до 0% и все работает.
squid.conf:
url_rewrite_program c:/squid/sbin/rejik/redirector.exe c:/squid/sbin/rejik/redirector.conf
url_rewrite_children 5.
redirector.conf:
error_log c:/squid/var/logs/redirector.err
change_log c:/squid/var/logs/redirector.log
make-cache c:/squid/sbin/rejik/make-cache
<SOCIAL_NET>
ban_dir c:/squid/sbin/rejik/banlist/social_net
url http://localhost/access_denied.html
redirector.err:
2010-05-27 11:21:55 [3304] Run make-cache (3.2.6)
2010-05-27 11:21:55 [3440] Waiting for make-cache finished
2010-05-27 11:21:55 [3396] Waiting for make-cache finished
2010-05-27 11:21:55 [3384] Waiting for make-cache finished
2010-05-27 11:21:55 [3172] Waiting for make-cache finished
2010-05-27 11:22:21 [3304] Make-cache finished
2010-05-27 11:22:21 [3304] Load 2 rules from c:/squid/sbin/rejik/banlist/social_net/urls.cache
2010-05-27 11:22:21 [3304] Load 0 pattern from SOCIAL_NET pcre
2010-05-27 11:22:21 [3304] Redirector start and working (3.2.6)
2010-05-27 11:26:49 [3172] Make-cache finished detected, continue
2010-05-27 11:26:49 [3172] Load 2 rules from c:/squid/sbin/rejik/banlist/social_net/urls.cache
2010-05-27 11:26:49 [3172] Load 0 pattern from SOCIAL_NET pcre
2010-05-27 11:26:49 [3172] Redirector start and working (3.2.6)
squid cache.log:
2010/05/27 11:21:55| Starting Squid Cache version 2.7.STABLE8 for i686-pc-winnt...
2010/05/27 11:21:55| Running as Squid Windows System Service on Windows XP
2010/05/27 11:21:55| Service command line is: servicecommandline
2010/05/27 11:21:55| Process ID 3332
2010/05/27 11:21:55| With 2048 file descriptors available
2010/05/27 11:21:55| With 2048 CRT stdio descriptors available
2010/05/27 11:21:55| Windows sockets initialized
2010/05/27 11:21:55| Using select for the IO loop
2010/05/27 11:21:55| Performing DNS Tests...
2010/05/27 11:21:55| Successful DNS name lookup tests...
2010/05/27 11:21:55| DNS Socket created at 0.0.0.0, port 2263, FD 5
2010/05/27 11:21:55| Adding nameserver 192.168.X.X from Registry
2010/05/27 11:21:55| Adding domain crystal-sugar.ru from Registry
2010/05/27 11:21:55| helperOpenServers: Starting 5 'redirector.exe' processes
cygwin warning:
MS-DOS style path detected: c:/squid/sbin/rejik/redirector.conf
Preferred POSIX equivalent is: /rejik/redirector.conf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.h ... -pathnames
2010/05/27 11:21:55| helperOpenServers: Starting 3 'ncsa_auth.exe' processes
2010/05/27 11:22:01| User-Agent logging is disabled.
2010/05/27 11:22:01| Referer logging is disabled.
2010/05/27 11:22:01| logfileOpen: opening log c:/squid/var/logs/access.log
2010/05/27 11:22:01| Unlinkd pipe opened on FD 40
2010/05/27 11:22:01| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2010/05/27 11:22:01| Target number of buckets: 425
2010/05/27 11:22:01| Using 8192 Store buckets
2010/05/27 11:22:01| Max Mem size: 8192 KB
2010/05/27 11:22:01| Max Swap size: 102400 KB
2010/05/27 11:22:01| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2010/05/27 11:22:01| logfileOpen: opening log c:/squid/var/logs/store.log
2010/05/27 11:22:01| Rebuilding storage in c:/squid/var/cache (CLEAN)
2010/05/27 11:22:01| Using Least Load store dir selection
2010/05/27 11:22:01| Set Current Directory to c:/squid/var/cache
2010/05/27 11:22:01| Loaded Icons.
2010/05/27 11:22:16| Accepting proxy HTTP connections at 0.0.0.0, port 3128, FD 46.
2010/05/27 11:22:16| Accepting ICP messages at 0.0.0.0, port 3130, FD 47.
2010/05/27 11:22:16| Accepting HTCP messages on port 4827, FD 48.
2010/05/27 11:22:16| Accepting SNMP messages on port 3401, FD 49.
2010/05/27 11:22:16| Ready to serve requests.
2010/05/27 11:22:44| Done reading c:/squid/var/cache swaplog (10 entries)
2010/05/27 11:22:44| Finished rebuilding storage from disk.
2010/05/27 11:22:44| 10 Entries scanned
2010/05/27 11:22:44| 0 Invalid entries.
2010/05/27 11:22:44| 0 With invalid flags.
2010/05/27 11:22:44| 10 Objects loaded.
2010/05/27 11:22:44| 0 Objects expired.
2010/05/27 11:22:44| 0 Objects cancelled.
2010/05/27 11:22:44| 0 Duplicate URLs purged.
2010/05/27 11:22:44| 0 Swapfile clashes avoided.
2010/05/27 11:22:44| Took 43.0 seconds ( 0.2 objects/sec).
2010/05/27 11:22:44| Beginning Validation Procedure
2010/05/27 11:22:44| Completed Validation Procedure
2010/05/27 11:22:44| Validated 10 Entries
2010/05/27 11:22:44| store_swap_size = 136k
2010/05/27 11:22:50| storeLateRelease: released 0 objects
Как побороть данную проблему?
Возникла следующая проблема:
Установлен и работает squidNT 2.7 STABLE 8. Из-за чрезмерного желания пользователей поразвлекаться, подключил к сквиду rejik 3.2.6 for Windows для начала с простым баном на odnoklassniki и vkontakte. При запуске squid создаются 5 процессов redirector.exe. Один из них процессорного времени не занимают, остальные 4 делят между собой все свободное процессорное время - загрузка 100% и на squid времени не остается. Загрузка процессора держится, пока не начнешь убивать процессы вручную. Как только процессов остается 2, все приходит в норму и начинает нормально работать. Если изначалбно url_rewrite children установить равным 2, при запуске сквида кратковременно нагрузка второго процесса редиректора поднимается до 100%, а затем падает до 0% и все работает.
squid.conf:
url_rewrite_program c:/squid/sbin/rejik/redirector.exe c:/squid/sbin/rejik/redirector.conf
url_rewrite_children 5.
redirector.conf:
error_log c:/squid/var/logs/redirector.err
change_log c:/squid/var/logs/redirector.log
make-cache c:/squid/sbin/rejik/make-cache
<SOCIAL_NET>
ban_dir c:/squid/sbin/rejik/banlist/social_net
url http://localhost/access_denied.html
redirector.err:
2010-05-27 11:21:55 [3304] Run make-cache (3.2.6)
2010-05-27 11:21:55 [3440] Waiting for make-cache finished
2010-05-27 11:21:55 [3396] Waiting for make-cache finished
2010-05-27 11:21:55 [3384] Waiting for make-cache finished
2010-05-27 11:21:55 [3172] Waiting for make-cache finished
2010-05-27 11:22:21 [3304] Make-cache finished
2010-05-27 11:22:21 [3304] Load 2 rules from c:/squid/sbin/rejik/banlist/social_net/urls.cache
2010-05-27 11:22:21 [3304] Load 0 pattern from SOCIAL_NET pcre
2010-05-27 11:22:21 [3304] Redirector start and working (3.2.6)
2010-05-27 11:26:49 [3172] Make-cache finished detected, continue
2010-05-27 11:26:49 [3172] Load 2 rules from c:/squid/sbin/rejik/banlist/social_net/urls.cache
2010-05-27 11:26:49 [3172] Load 0 pattern from SOCIAL_NET pcre
2010-05-27 11:26:49 [3172] Redirector start and working (3.2.6)
squid cache.log:
2010/05/27 11:21:55| Starting Squid Cache version 2.7.STABLE8 for i686-pc-winnt...
2010/05/27 11:21:55| Running as Squid Windows System Service on Windows XP
2010/05/27 11:21:55| Service command line is: servicecommandline
2010/05/27 11:21:55| Process ID 3332
2010/05/27 11:21:55| With 2048 file descriptors available
2010/05/27 11:21:55| With 2048 CRT stdio descriptors available
2010/05/27 11:21:55| Windows sockets initialized
2010/05/27 11:21:55| Using select for the IO loop
2010/05/27 11:21:55| Performing DNS Tests...
2010/05/27 11:21:55| Successful DNS name lookup tests...
2010/05/27 11:21:55| DNS Socket created at 0.0.0.0, port 2263, FD 5
2010/05/27 11:21:55| Adding nameserver 192.168.X.X from Registry
2010/05/27 11:21:55| Adding domain crystal-sugar.ru from Registry
2010/05/27 11:21:55| helperOpenServers: Starting 5 'redirector.exe' processes
cygwin warning:
MS-DOS style path detected: c:/squid/sbin/rejik/redirector.conf
Preferred POSIX equivalent is: /rejik/redirector.conf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.h ... -pathnames
2010/05/27 11:21:55| helperOpenServers: Starting 3 'ncsa_auth.exe' processes
2010/05/27 11:22:01| User-Agent logging is disabled.
2010/05/27 11:22:01| Referer logging is disabled.
2010/05/27 11:22:01| logfileOpen: opening log c:/squid/var/logs/access.log
2010/05/27 11:22:01| Unlinkd pipe opened on FD 40
2010/05/27 11:22:01| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2010/05/27 11:22:01| Target number of buckets: 425
2010/05/27 11:22:01| Using 8192 Store buckets
2010/05/27 11:22:01| Max Mem size: 8192 KB
2010/05/27 11:22:01| Max Swap size: 102400 KB
2010/05/27 11:22:01| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2010/05/27 11:22:01| logfileOpen: opening log c:/squid/var/logs/store.log
2010/05/27 11:22:01| Rebuilding storage in c:/squid/var/cache (CLEAN)
2010/05/27 11:22:01| Using Least Load store dir selection
2010/05/27 11:22:01| Set Current Directory to c:/squid/var/cache
2010/05/27 11:22:01| Loaded Icons.
2010/05/27 11:22:16| Accepting proxy HTTP connections at 0.0.0.0, port 3128, FD 46.
2010/05/27 11:22:16| Accepting ICP messages at 0.0.0.0, port 3130, FD 47.
2010/05/27 11:22:16| Accepting HTCP messages on port 4827, FD 48.
2010/05/27 11:22:16| Accepting SNMP messages on port 3401, FD 49.
2010/05/27 11:22:16| Ready to serve requests.
2010/05/27 11:22:44| Done reading c:/squid/var/cache swaplog (10 entries)
2010/05/27 11:22:44| Finished rebuilding storage from disk.
2010/05/27 11:22:44| 10 Entries scanned
2010/05/27 11:22:44| 0 Invalid entries.
2010/05/27 11:22:44| 0 With invalid flags.
2010/05/27 11:22:44| 10 Objects loaded.
2010/05/27 11:22:44| 0 Objects expired.
2010/05/27 11:22:44| 0 Objects cancelled.
2010/05/27 11:22:44| 0 Duplicate URLs purged.
2010/05/27 11:22:44| 0 Swapfile clashes avoided.
2010/05/27 11:22:44| Took 43.0 seconds ( 0.2 objects/sec).
2010/05/27 11:22:44| Beginning Validation Procedure
2010/05/27 11:22:44| Completed Validation Procedure
2010/05/27 11:22:44| Validated 10 Entries
2010/05/27 11:22:44| store_swap_size = 136k
2010/05/27 11:22:50| storeLateRelease: released 0 objects
Как побороть данную проблему?