15,894,405 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.