Archived

This forum has been archived. Please start a new discussion on GitHub.

Performance problem ...

Hello,

I've some performances issues, so if you have some tips to fix them, it is welcome.

My application looks like this:

- A server S1, the glacier router, and n clients.

- Each client create a session through the Glacier2 and register a callback.

- On the server side, I've a thread that produce lots of data (depends on the hour of the day), data are stored inside a vector protected by a mutex (When i insert the data inside the vector i tag them with the local time). So i've another thread that consumes these data and try to send them for each listener subscribed by clients.


It seems that there are too much data to send for each listener. Because just before to send the data, i compare the current local time with the one of the data and the difference in superior than 3 seconds. Moreover, Glacier2, clients, server are running on the same computer without consume more than 10% of the CPU.

Have you an idea how can i optimize the model ?

Thank you.

Comments

  • I've analysed the problem more deeper, and i think that i need to make some changes inside my code. Because i saw that the server try to send several thousand query in one seconds ...

    Joel
  • benoit
    benoit Rennes, France
    Hi Joel,

    Yes, you should do some profiling (either using a profiler tool or adding some profiling code to your application) to figure out the bootleneck. If sending the requests to the clients through Glacier2 is taking too much time, you should try to send less updates.

    Optimizing the server to send the requests in batches might also help (assuming the requests are oneway requests). See the Ice manual for more information on batched requests (section 30.15 and 40.9.3 in particular).

    Cheers,
    Benoit.