[syslog-ng] Fail safe test for syslog-ng

dstuxo dstuxo at gmail.com
Thu Jan 17 13:12:08 CET 2008


Hi,

Here is a new test result..
I also attached some strace logs.

-------------------------------------------
* syslog-ng commnad:
  $ strace -T -tt -f -ff -s 4096 -o /root/localfile syslog-ng &
-------------------------------------------
* file desciptors:
root at localhost:/root> lsof -p 2506 
COMMAND    PID USER   FD   TYPE     DEVICE    SIZE       NODE NAME
syslog-ng 2506 root  cwd    DIR        3,1    4096      46980 /root
syslog-ng 2506 root  rtd    DIR        3,1    4096          2 /
syslog-ng 2506 root  txt    REG        3,1  129364     109801 
/usr/sbin/syslog-ng
syslog-ng 2506 root  mem    REG        3,1  110488      31754 /lib/ld-2.5.so
syslog-ng 2506 root  mem    REG        3,1 1207784      32811 
/lib/libc-2.5.so
syslog-ng 2506 root  mem    REG        3,1   12916      31647 
/lib/libevtlog.so.0.0.0
syslog-ng 2506 root  mem    REG        3,1   82052      32865 
/lib/libpthread-2.5.so
syslog-ng 2506 root  mem    REG        3,1   77132      32851 
/lib/libnsl-2.5.so
syslog-ng 2506 root  mem    REG        3,1  594160      31648 
/lib/libglib-2.0.so.0.1200.0
syslog-ng 2506 root  mem    REG        3,1   32632      32896 
/lib/libwrap.so.0.7.6
syslog-ng 2506 root  mem    REG        3,1   28384      31758 
/lib/librt-2.5.so
syslog-ng 2506 root    0r   CHR        1,3               1919 /dev/null
syslog-ng 2506 root    1w   CHR        1,3               1919 /dev/null
syslog-ng 2506 root    2w   CHR        1,3               1919 /dev/null
syslog-ng 2506 root    3r   REG        0,3       0 4026531849 /proc/kmsg
syslog-ng 2506 root    4u  unix 0xdd9d4b00               8863 /dev/log
syslog-ng 2506 root    5w   REG        3,1   91370      62735 
/var/log/messages
syslog-ng 2506 root    7w   REG        3,1    6386      62771 
/var/log/maillog
syslog-ng 2506 root   10w   REG        3,1  103498      62724 
/var/log/cron.log
root at localhost:/root>
-------------------------------------------
* The script used for testing:
#!/bin/sh

  for i in `seq 1 10000`;
   do
     echo "THIS IS A TEST MESSAGE $i"
     logger -t tester -p cron.info "THIS IS A TEST MESSAGE $i"
   done
#eof
-------------------------------------------


Balazs Scheidler wrote:
> syslog-ng has multiple input/output channels and the writes to disk is
> also controlled by the main poll loop.
>
> e.g. 
>
> * when a message is received, it is added to the outgoing queue
> * then when the poll() indicates that the destination file/tcp/udp
> socket becomes writable, it is written to the target.
>
> Using poll() this way can add some latencies.
>
> strace has a parameter to display timing information related to
> syscalls, can you measure how long it takes for syslog-ng to receive the
> message (recvfrom() syscall) and write it out (write() syscall).
>
> I might be able to reduce this latency somewhat, if this is indeed the
> problem.
>
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strace_out.txt
Url: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080117/7995d02a/attachment.txt 


More information about the syslog-ng mailing list