Forum Discussion

Sylvain_Augé_72's avatar
Sylvain_Augé_72
Icon for Nimbostratus rankNimbostratus
Aug 04, 2008

5 seconds to execute a simple function.......

Hello again,

 

 

as you already know it I developped an application using the language C to access the F5 loadbalancers to get some informations and print them on a webpage.

 

I am using a dll to get all the desired fonctions that i could need.

 

 

My problem is that this code :

 

NodeAddress.LocalLBNodeAddressNodeAddressStatistics statistics = NodeAddress.get_statistics(node_liste);

 

 

takes 5 seconds to be executed ! The "node_liste" is an array containing 16 nodes !

 

 

Do you have any idea why it takes such a long time ?

 

 

Thanks a lot

 

 

Sylvain
  • That method should not take 5 seconds. The only thing I can think of is that if it's the first method call on the interface, there may be some overhead in setting up the SSL connection but it shouldn't take 5 seconds. I just tried that method with 18 nodes and it returned in 0.066s.

     

     

    Can you supply the code that you are using to create node_liste?

     

     

    Are all methods taking that long to return or is it just the get_statistics() method?

     

     

    I guess there theoretically could be a delay if your BIG-IP is running near capacity as well.

     

     

    -Joe
  • Hello !

     

     

    Thanks for your answer !

     

    Here is the code that i am using to get "node_liste"

     

     

    public void get_node_list(string partition, string Hostname, string Username, string Password) 
             { 
                 iControl.Interfaces my_interface = new iControl.Interfaces(); 
                 my_interface.initialize(Hostname, Username, Password); 
                 my_interface.ManagementPartition.set_active_partition(partition); 
      
                 string[] node_list_i = my_interface.LocalLBNodeAddress.get_list(); 
                 list_node = node_list_i; 
             } 
      
             public string[] get_list_node() 
             { 
                 return list_node; 
             }

     

     

    The others methods are fine it is only this one that takes a lot of time.

     

     

    I don't think that the BIG-IP are running near capacity because they are brand new and we just started to use them a few days ago.

     

     

    I also tried to use the code which was within the SDK (for C), so in "console" mode (without any graphic interface). And it is faster but still when it comes to this method it takes a few seconds to print the results.

     

     

    Thanks for your previous answer

     

     

    Sylvain
  • Your first example was calling the get_statistics() method and this only calls the get_list() method. Are both methods slow? What about the set_active_partition() method? That should execute very fast as it's just an in-memory variable setting on the server. Is that one performing slow as well?

     

     

    -Joe
  • No the get_list() method is fast or at least normal as well as the set_active_partition() method.

     

     

    The get_statistics() method is really the only one taking a long time to be executed.

     

    Soon i'll be able to try those methods on a different loadbalancer in order to know if the problem comes fom the actual loadbalancer or if it is the same for each of them.

     

     

    If you have any other ideas i'll be around and i'll come back to you after i try my code on another LB.

     

     

     

    Sylvain