1

Topic: Sockets and CPU loading

There is a program using locking sockets in flows. By operation with one flow loading on the CPU about 50 %, and at several triggered flows - almost 100 %! The computer hangs (((question what to do and in what can disappear angrily? Thanks!

2

Re: Sockets and CPU loading

Hello, Poseidon, you wrote: P> there is a program using locking sockets in flows. P> by operation with one flow loading on the CPU about 50 %, and at several triggered flows - almost 100 %! P> the computer hangs (((P> question what to do and in what can disappear angrily? Thanks! Check that returns recv. And profiling to you in the help

3

Re: Sockets and CPU loading

Hello, Poseidon, you wrote: P> there is a program using locking sockets in flows. Source codes are at this program?

4

Re: Sockets and CPU loading

Hello, andrey.desman, you wrote: AD> Hello, Poseidon, you wrote: P>> there is a program using locking sockets in flows. AD> source codes are at this program? Is. But if briefly, it is used libcurl with support SSL and locking sockets looked once again, in one flow there is a downloading like all  and when downloading in 5 flows that processor loading very quickly grows to 100 % almost. Possibly that that is confused with synchronization (((but what?

5

Re: Sockets and CPU loading

Hello, Poseidon, you wrote: P> looked once again, in one flow there is a downloading like all  and when downloading in 5 flows that P> processor loading very quickly grows to 100 % almost. Possibly that that is confused with synchronization (((P> but what? And what general flow given (how many megabytes per second are swung)? And that has been mentioned SSL, and decryption of great volume of the data occupies a lot of CPU time. Perhaps all is quite lawful?

6

Re: Sockets and CPU loading

Hello, Poseidon, you wrote: P> there is a program using locking sockets in flows. P> by operation with one flow loading on the CPU about 50 %, and at several triggered flows - almost 100 %! P> the computer hangs (((Vanguju something like while ((err = recv (buf))! = EAGAIN) {copy (buf, file, sizeof (buf))} P> the question what to do and in what can disappear angrily? Thanks! Try to use non-blocking sockets.