lesterkong / audioscout

Automatically exported from code.google.com/p/audioscout
GNU General Public License v3.0
0 stars 0 forks source link

High CPU Usage of auscoutd #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I get close to 100% cpu usage on 1 core of 2.4GHZ cpu for a load of 1Mbyte 
audio file (.wav) every 5 seconds. Further checks showed that this is due to 
zmq (version 2.2.0). Others have run into this issue with zeromq on other 
projects (google says so). Has anyone run into this with this project? I will 
appreciate your experiences.

Original issue reported on code.google.com by solomona...@gmail.com on 1 Oct 2012 at 7:38

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
After further checks I have my time delay of 10 msecs in waitresults in 
auscout.c as shown below, So far so good, further developments will be 
communicated for your info. 

    do {
        usleep(10000);
    err = zmq_recv(skt, &msg, ZMQ_NOBLOCK);
    } while (err && time(NULL) < curr + WAIT_TIME_SECONDS);

Original comment by solomona...@gmail.com on 2 Oct 2012 at 4:15

GoogleCodeExporter commented 8 years ago
Thanks.  I have noticed that using zeromq often requires those slight delays.  
You can also use the poll function in zeromq to wait on messages.

Original comment by starkd88@gmail.com on 4 Oct 2012 at 6:36

GoogleCodeExporter commented 8 years ago
Hi,
I have to find the time to study zeromq.

Original comment by solomona...@gmail.com on 4 Oct 2012 at 7:12