High marks for: Quad Core multi threading, why does CPU take up only 25%

VS2005, The development of C++, Quad Core i7 notebook, WinXP SP3

Program a total of 3 threads: user UI, information receiving and data calculation. In the data calculation thread was full load has been unable to real-time processing (display delayed obviously), CPU occupancy rate is still less than 25%. At this time a message receiving thread is processing load equivalent, such as multi core should be more than 25% of the.

Computing the message receiving and data threads use the signal is synchronous, but rarely used and the processing time is very short.

The problems are as follows:
1 single process under the procedures are more threads can only use a CPU? If we can use multi core words, how to set up the?
The 2 signal synchronization if the effects of the CPU use?

Welcome to reply, there is a need to. Thank you very much.

Started by Bennett at November 21, 2016 - 3:45 PM

A message receiving thread and then "load" considerable, with your so-called "is a drop in the bucket compared data computation thread".

You have data calculation should be multi thread processing. This is just like such as the core route is not optimized, net to waste time on is very relaxed line, what is the meaning of it?

Posted by Burke at November 24, 2016 - 4:05 PM

Now discuss why open multiple threads, but not to the nuclear sharing effect. My question is very clear, is two points above that.

Thanks to the participation, although give an irrelevant answer. How the computation part of the process, I also old programmers, the heart is very clear.

Posted by Bennett at November 28, 2016 - 5:02 PM

Ha ha, in fact, a building has been answered.

The 3 thread you, computational threads may reach 100 only data%,
The other threads, for example "message receiving thread", no accident, the general also 1%.
So in the 4 kernel, you can use the full 1 nucleus, 25%.

In a word, in order to improve the utilization of CPU,
You must think of a way to put data into multi thread processing.

Posted by Fitzgerald at December 10, 2016 - 5:24 PM

25% indicate that only one thread scheduling.

You should lock caused by excessive. Or your load is not in CPU but in the network, IO or elsewhere.

Posted by Byron at December 23, 2016 - 5:38 PM

Thank you to answer

First explain the various parts of the computation:
1)Message receiving thread is responsible for decoding the received message, and the use of signal into a public cache
2)Data is the common thread caching messages into another computational caching and show regular, was not calculated in essence.
I have a test case can send mass message, the data calculation of full load of 25% thread, other threads even if only 1%, displays occupy 26% CPU I think is understandable, but it is no more than 25%.

Analysis in addition I tend to caozhy, may be other local signal and network impedes efficiency. These two days to write programs to try again, and then return.

Posted by Bennett at January 07, 2017 - 6:04 PM