Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Perfomance



Permlink Replies: 2 - Last Post: Dec 26, 2016 2:29 AM Last Post By: Alexander Popov
Alexander Popov

Posts: 52
Registered: 7/22/05
Perfomance
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2016 5:24 AM
Hi!

I have an application that generally performs pretty well but sometimes becomes irresponsible. It doesn't hang, but replays very slow. I noticed that it happens when it spawns more then 35 threads. More threads - more delays. At those moment CPU load becomes constant and slightly fluctuates near 25%.
[http://savepic.ru/12461770.png]
Maybe it is because the processor of those machine has 4 core, but I observed CPU load per core and all cores were loaded equally.
[http://savepic.ru/12479181.png]
I'm curious, why it doesn't allocate all 100% CPU in this case? It looks like the kind of synchronization problem: the threads wait for each other.

After some time, when the load is reduced, the amount of threads is reduced too and the application starts to respond quickly again. But sometimes, when the load keeps up I see that the amount of the threads continues to increase while the session count remains constant. The application becomes totally irresponsible and the only way out is to reboot it.

The application is a standalone service. It is based on CGDevTools components, so it heavily uses ajax. The forms have KeepAlive property set to true.
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Perfomance
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2016 4:19 PM   in response to: Alexander Popov in response to: Alexander Popov
Alexander Popov wrote:
Hi!

I have an application that generally performs pretty well but sometimes becomes irresponsible. It doesn't hang, but replays very slow. I noticed that it happens when it spawns more then 35 threads. More threads - more delays. At those moment CPU load becomes constant and slightly fluctuates near 25%.
[http://savepic.ru/12461770.png]
Maybe it is because the processor of those machine has 4 core, but I observed CPU load per core and all cores were loaded equally.
[http://savepic.ru/12479181.png]
I'm curious, why it doesn't allocate all 100% CPU in this case? It looks like the kind of synchronization problem: the threads wait for each other.

After some time, when the load is reduced, the amount of threads is reduced too and the application starts to respond quickly again. But sometimes, when the load keeps up I see that the amount of the threads continues to increase while the session count remains constant. The application becomes totally irresponsible and the only way out is to reboot it.

The application is a standalone service. It is based on CGDevTools components, so it heavily uses ajax. The forms have KeepAlive property set to true.

Maybe the best option is get a dump (or more than one) of the process when it starts to behave like that.

Seems that you have full access to that server so if you can get a dump, we can probably discover what is happening with all those threads. Can you do that?
It is important to have a full MAP file of this application, with all debugging symbols.

About your question "why it doesn't allocate all 100% CPU in this case", well, it is not up to the process to determine how the OS will allocate its resources. Most of those 35 threads are created by Indy HTTP server and how they are going to be distributed in cores is not determined by the application.
Alexander Popov

Posts: 52
Registered: 7/22/05
Re: Perfomance
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 26, 2016 2:29 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Hi, Alexandre!

I'll make a dump file and send it to your e-mail next time the problem happen.
Thanks!

Alexandre Machado wrote:
Alexander Popov wrote:
Hi!

I have an application that generally performs pretty well but sometimes becomes irresponsible. It doesn't hang, but replays very slow. I noticed that it happens when it spawns more then 35 threads. More threads - more delays. At those moment CPU load becomes constant and slightly fluctuates near 25%.
[http://savepic.ru/12461770.png]
Maybe it is because the processor of those machine has 4 core, but I observed CPU load per core and all cores were loaded equally.
[http://savepic.ru/12479181.png]
I'm curious, why it doesn't allocate all 100% CPU in this case? It looks like the kind of synchronization problem: the threads wait for each other.

After some time, when the load is reduced, the amount of threads is reduced too and the application starts to respond quickly again. But sometimes, when the load keeps up I see that the amount of the threads continues to increase while the session count remains constant. The application becomes totally irresponsible and the only way out is to reboot it.

The application is a standalone service. It is based on CGDevTools components, so it heavily uses ajax. The forms have KeepAlive property set to true.

Maybe the best option is get a dump (or more than one) of the process when it starts to behave like that.

Seems that you have full access to that server so if you can get a dump, we can probably discover what is happening with all those threads. Can you do that?
It is important to have a full MAP file of this application, with all debugging symbols.

About your question "why it doesn't allocate all 100% CPU in this case", well, it is not up to the process to determine how the OS will allocate its resources. Most of those 35 threads are created by Indy HTTP server and how they are going to be distributed in cores is not determined by the application.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02