RTC Forums
November 24, 2024, 07:44:46 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: TRtcHttpClient Thread Usage  (Read 4342 times)
DougB
Newbie
*
Posts: 19


« on: September 10, 2014, 08:09:14 PM »

My application has created a total of 250 connections to a server to handle a specific load.  From perfmon, I noticed that 180 threads have been created.  

Out of curiosity, what is the ratio of threads to connections?  Since this is using asynchronous Winsock, the number of threads seemed a bit high, but I assume it has been tuned to this value for a reason (I also created 1000 connections, and the number of threads created was about the same). 

Can the number of threads be adjusted or should it ever be adjusted?

In any case, everything is performing very, very well! Smiley

Thanks,
Doug
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: September 11, 2014, 01:11:43 AM »

Default RTC Thread Pool configuration should work for most Applications, but it can be adjusted by changing global variables declared in the rtcThrPool.pas unit, before creating any RTC components (for example, when your Application starts). A new thread will be started if a new job has been placed in the thread job queue but there are no threads in the pool yet, or if all the threads from the pool are currenty busy and the maximum number of allowed threads (RTC_THREAD_POOL_MAX) has not been reached. Because starting and stopping a Thread is relatively expensive, but idle Threads in a RTC Thread Pool do not consume any CPU time, a Thread will be stopped only if the number of idle Threads has exceeded the allowed Thread Pool Oversize limit (RTC_THREAD_POOL_OVERSIZE).

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.