webalizer 속도가 안나올때... 서버 다스리기
2012.03.06 13:55 Edit
CentOS 환경에서 yum 으로 webalizer 를 설치했을 때
webalizer 실행시 속도가 너무 떨어져서 원인을 찾다가 발견한 것을 정리한 내용.
예전에 소스 컴파일 해서 설치했을 때나 안녕리눅스 사용할 때에는 webalizer 실행시에 빠르게 로그 분석이 되었는데
서버를 변경하면서 CentOS를 사용해보니 상대적으로 속도가 너무 떨어지는 현상이 발생했다.
webalizer 아래에 child 프로세스가 10개 정도 생겨 있었는데
문제의 원인은 reverse DNS lookups 을 수행하는 것 때문이었다.
30245 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30246 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30247 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30248 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30249 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30250 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30251 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30252 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30253 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30254 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
30255 pts/1 S+ 0:00 | \_ /usr/bin/webalizer -c /etc/webalizer/webalizer.conf
readme 내용은 다음과 같다.
-D name This allows the specification of a DNS Cache file name. This
filename MUST be specified if you have dns lookups enabled
(using the -N command line switch or DNSChildren configuration
keyword). The filename is relative to the default output
directory if an absolute path is not specified (ie: starts
with a leading '/'). This option is only available if DNS
support was enabled at compile time, otherwise an 'Invalid
Keyword' error will be generated. See the DNS.README file
for additional information regarding DNS lookups.
Configuration file keyword: DNSCache
-N num Number of DNS child processes to use for reverse DNS lookups.
If specified, a DNSCache name MUST be specified also. If you
do not wish a DNS cache file to be generated, specify a value
of zero ('0') to disable it. This does not prevent using an
existing cache file, only the generation of one at run time.
See the DNS.README file for additional information.
Configuration file keyword: DNSChildren
해결방법은 간단하다.
webalizer.conf 설정파일에
DNSChildren 0
위와 같이 설정만 추가하면 child 프로세스가 생기지 않으며 Reverse DNS lookup 을 하지 않기 때문에
실행속도가 비약적으로 빨라진다.
- [2011/10/25] 인터넷 속도 빠르게 하기 iVelocity 정식판! (28) *1
- [2012/02/15] How to Speed Up 'Mission Control' in Mac OS X Lion (1205)
- [2010/12/19] 토트 블로그, 새벽에는 무지 빠르네요 (3350, 1) *2
- [2010/12/04] SSH 접속 지연 문제 (2703)
- [2010/06/19] 우리는 왜 스냅드래곤에 열광하는가 (5101, 2) *2
토트에서 다시 이어갑니다. ^^ 