Home Help Center

Performance problem ...

joel venninjoel vennin Member Joël VenninOrganization: University Lille 1Project: Just Testing when i have time
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

  • joel venninjoel vennin Member Joël VenninOrganization: University Lille 1Project: Just Testing when i have time
    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
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
Sign In or Register to comment.