[strongSwan] Is there any way to avoid read lock in high load?

Chinmaya Dwibedy ckdwibedy at yahoo.com
Thu May 1 10:23:33 CEST 2014

I am running the IPsec scenario under high load (250k IPsec
tunnels with 400+ tunnels per second ) using load tester plugin. I have disabled
the logging and configured 64 threads at both the ends. But I find the vlog
function is called even if there is no log to be generated by Charon. This frequent
and unnecessary locking/unlocking consumes CPU cycles. Is there any way to avoid
this?  Note: I am using strongswan-5.0.4.
/root> watch -n 2 pstack 868
Every 2.0s: pstack 868                                  Thu Jan  1 00:12:56 1970
Thread 1 (process 868):
#0  0x000000555f72beb0
in pthread_rwlock_rdlock () from /lib64/libpthread.so.0
#1  0x000000555f793370
in read_lock () from /usr/lib64/libstrongswan.so.0
#2  0x000000555f7ef01c
in vlog () from /usr/lib64/libcharon.so.0
#3  0x000000555f7ef1d8
in log_ () from /usr/lib64/libcharon.so.0
#4  0x000000555f7f9f0c
in generate_payload () from /usr/lib64/libcharon.so.0
#5  0x000000555f8013a8
in generate () from /usr/lib64/libcharon.so.0
#6  0x000000555f802268
in encrypt () from /usr/lib64/libcharon.so.0
#7  0x000000555f7fcb4c
in generate () from /usr/lib64/libcharon.so.0
#8  0x000000555f815fd4
in generate_message () from /usr/lib64/libcharon.so.0
#9  0x000000555f821a78
in initiate () from /usr/lib64/libcharon.so.0
#10 0x000000555f822828 in process_message () from
#11 0x000000555f8131f8 in process_message () from
#12 0x000000555f80d1f4 in execute () from /usr/lib64/libcharon.so.0
#13 0x000000555f78de14 in process_jobs () from
#14 0x000000555f791ddc in thread_main () from
Even if nobody is listening for these logs, vlog acquires
the log
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/users/attachments/20140501/7dcef9eb/attachment.html>

More information about the Users mailing list