<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>Hi All,</span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>I am doing scalability/load test (250k IPsec tunnels) using
load tester plugin strong swan 5.0.4).</span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>I have configured the number of threads to 32 at both the ends
(IKE responder and IKE Initiator). At IKE Initiator end, if I increase the
sender threads (i.e., initiators in load-tester section) from 5 to 10 (i.e., to
put load on all cores), I find the followings at IKE Responder end.</span></div><div><font face="Times New Roman">
</font></div><ol style="list-style-type: decimal; direction: ltr;"><li style="color: rgb(0, 0, 0); font-size: 10pt; font-style: normal; font-weight: normal;"><div style="color: rgb(0, 0, 0); font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-list: l0 level1 lfo1;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>There are huge packets loss (i.e., packet receive
errors in the Udp section) in #netstat –su.</span></div></li><li style='color: rgb(0, 0, 0); font-family: "Comic Sans MS"; font-size: 10pt; font-style: normal; font-weight: normal;'><div style='color: rgb(0, 0, 0); font-family: "Calibri","sans-serif"; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 10pt; mso-list: l0 level1 lfo1;'><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>The Recv-Q column of the isakmp connection is high
and doesn't drop to zero in <span style="mso-spacerun: yes;"> </span>#netstat
–ua.</span></div></li></ol><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'><br>
Note that, if I keep the initiators and iterations to 5 and 50000 respectively,
then there was no loss at all. <span style="mso-spacerun: yes;"> </span></span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>The Receiver listens on the UDP socket for incoming IKE
messages. If it receives an IKE message over the Socket he creates a
“process_message_job” for the message and adds this job to the Jobqueue of the
Processor. The IKE message is then processed through the Processor and its
threads. The Receiver has no separate thread. There is just a “receiver” job
which is executed regularly by the Processor.</span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>The Receiver that picks up data from the socket buffers and
hands it over for processing is unable to keep up. The average arrival rate
regularly causes a backlog in the receive queue. I also increased the maximum
number of queued received data via /proc/sys/net/ipv4/udp_mem and
/proc/sys/net/ipv4/udp_rmem_min, but it could not prevent loss.</span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>I also profiled the Charon daemon (IKE Responder) and found
that, most of the threads are getting blocked in pthread_cond_wait(). <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>It
means the thread currently has no work to do and waits for a job. </span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>Can anyone please suggest what might be the issues behind this
slow receiver (at IKE Responder end) and the ways to resolve the same?</span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>Your help in this regard will be highly appreciated. <span style="mso-spacerun: yes;"> </span></span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'> </span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>Regards,</span></div><div><font face="Times New Roman">
</font></div><div style="margin: 0in 0in 10pt;"><span style='line-height: 115%; font-family: "Comic Sans MS"; font-size: 10pt;'>Chinmaya </span></div><div><font face="Times New Roman">
</font></div></div></body></html>