U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » CoWork buggy!?
Re: CoWork buggy!? [message #14980 is a reply to message #14979] Mon, 24 March 2008 11:22 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Mon, 24 March 2008 05:48

As far as I understand, CoWork detects number of processors present and tries to execute threads on different cores. Is that so?



Yep, that is the main goal.

Quote:


Can I have CoWork statistics how many theads are executed on each processor?



No Smile But the thread-pool is set to number-of-logical-cpus + 2.

"2" is arbitrarily choosen number. In reality, "jobs" can do I/O, so you want a reserve for blocking operations. OTOH, too much more threads would cause too much overhead - it seems that >5 slows things down.

If you want some deeper insight into CoWork operations, you can activate LLOG and LDUMP in Core/CoWork.cpp.

BTW: In debug mode, it is very common to see less than 100% CPU utilization even when using CoWork. This is caused by fact that quite frequently called memory allocator is in debug locked (to do diagnostics agenda).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IsFinished() for CoWork
Next Topic: MT on Linux?
Goto Forum:
  


Current Time: Tue Jun 30 23:07:47 GMT+2 2026

Total time taken to generate the page: 0.05792 seconds