Click here to Skip to main content
15,894,405 members

Comments by hazem12 (Top 1 by date)

hazem12 9-Nov-10 7:49am View    
thanks for your comment.
First of all I was sending each message to an client as a job assigned to thread pool and I made IWorkItemsGroup for each client to make sure that all messages sent to client in order but on about 100 client with the rate less than 100 message per second I faced problem that the CPU always more that 95 % I made some search about that and I found that the sending job to one client is fast job and it maybe cost less than assigning the job to thread pool so. I modified the code to make the job to be sending to list of clients and the number in the list depends on a number I assigned in the program configuration so if we have 100 clients and the number I assigned is 5 so each list we have 25 clients. But also on this way I faced a little problem on 500 clients with assigned number about 32 so each list has 16 clients we have the problem I mentioned and the CPU be always more than 95% but if I modified the number to 500 I still have delay as I mentioned in my problem but the CPU reduced to 60% also even if I have 1000 client with 500 number assigning .but the delay problem still there . and I set the maximum number in the thread pool to high number about 500 thread and the all threads application not more 170 thread according to task manager.