Forum Discussion

ST_Wong's avatar
ST_Wong
Icon for Cirrus rankCirrus
Mar 07, 2012

Pls help: delay with Nagle's algorithm

Hi all,

 

 

We're running 9.3 on a pair of LTM 6400. We've virtual servers for LDAPS (using LTM's SSL acceleration) and LDAP traffic.

 

 

 

A user complained one of their jobs that issues 100K LDAP queries runs ~10 times longer than expected. After some studies, we found that performance resumes normal if:

 

 

 

- we switch the user job to use LDAPS virtual server on the 6400 !

 

- bypass LTM and talk to backend LDAP servers directly

 

- turn off Nagle's algorithm in tcp profile used by the LDAP and LDAPS virtual servers.

 

 

 

Performance of single LDAP query to LDAP virtual server is of order 0.1ms while that for LDAPS virtual server is of order 0.01ms.

 

 

 

Although the issue is resolved by defining a customized tcp profile with Nagle's Algorithm disabled, I wonder why when Nagle's Algorithm is enabled, there is no impact on performance for SSL accelerated virtual server (I expect both LDAP/LDAPS experience the same delay).

 

 

 

Would anyone please help? Thanks a lot.

 

 

 

Rgds,

 

/ST Wong

 

 

 

 

 

 

 

7 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    I bad the same problem recently but in reverse. Ldap was fast, ldaps was about 8x slower. Setting the VS to use the tcp-lan-optimised with no nagles etc sped it up... The reason for that is probably to do with the size of the object returned. Nagels algorithm goes out of its way to make the tcp stream efficient in terms of packets. But that usually means introducing a small delay in sending the data thats been written to the socket hoping we can put more data into ghe next packet being sent.

     

     

    The difference between the ldap and ldaps timings is probably to do with the different sizes of data being sent for the sponses when encrypted or not.

     

     

    Normally nagels would be bypassed at the host by setting TCP_NODELAY on the socket... But i think the issue is that the full proxy nature of bigip re-enables that delay because it doesnt realise that nagels was disabled by the app in the first place...

     

     

    H
  • Thanks. Still investigating into the cause... Btw, I wonder if there is any tool on bigip (like strace or systemtap on linux) for further debugging...

     

     

    /S
  • Thanks. Still investigating into the cause... Btw, I wonder if there is any tool on bigip (like strace or systemtap on linux) for further debugging...

     

     

    /S
  • Thanks. Still investigating into the cause... Btw, I wonder if there is any tool on bigip (like strace or systemtap on linux) for further debugging...

     

     

    /S
  • Thanks. Still investigating into the cause... Btw, I wonder if there is any tool on bigip (like strace or systemtap on linux) for further debugging...

     

     

    /S
  • oops, sorry that my browser goes nut and I pressed submit button several times.... :(
  • did you ever get further with this? as nagle effect seems to be related to packet sizes [1] it might be the case for you also?

     

     

    [1] http://www.stuartcheshire.org/papers/NagleDelayedAck/