Skip to main content

Topic: Piperec.exe uses a lot of CPU (Read 6165 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Piperec.exe uses a lot of CPU
Tried the following with piperec.exe from Case's site; first recording from soundcard to a file:
Code: [Select]
piperec 44100 16 2 | lame --preset standard - - > F:\test.mp3

Then send the result as a stream with ezstream:
Code: [Select]
piperec 44100 16 2 | lame --preset standard - - | ezstream -c C:\MYPATH\ezstream_stdin.xml

This is very practical and useful. However I discovered that CPU goes straight to 100% in both cases. I checked with Windows Task Manager and Sysinternals ProcessExplorer. Piperec uses between 30 to 50% of CPU. Also csrss.exe, the client/server run-time subsystem for Windows, uses an equal amount of CPU. The csrss process goes to these figures when piperec is started, and goes straight down as piperec process is stopped, so there's gotta be a connection. Then lame uses an 7-8% so all in all this uses almost 100% of CPU as long as it's run. As piperec only takes sound from soundcard and sends it to stdout as wav with specified samplerate, bitdepth and channels, I think it's a bit strange that it should use this much CPU. A bit pity too, as it's a useful tool (and the only Win32 command line tool I know of that does this).

My system has a nForce2 based Asus mobo with Athlon XP 3000+ and 1 GB RAM, running XPsp2.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
       - Oceania Association of Autonomous Astronauts

  • Preuss
  • [*][*]
Piperec.exe uses a lot of CPU
Reply #1
Quote
Piperec uses between 30 to 50% of CPU. Also csrss.exe, the client/server run-time subsystem for Windows, uses an equal amount of CPU. ...

I have compiled a new one for you, it should work. Lucky it was with source code ;-)

Quote
My system has a nForce2 based Asus mobo with Athlon XP 3000+ and 1 GB RAM, running XPsp2.
[{POST_SNAPBACK}][/a]

It's nothing to do with your mobo or processor. I have P4 and it also goes to 100% CPU usage.

Please use my new compile and try it out, please tell me if it works.
[a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=34832]Cases piperec that no longer hog the CPU[/url]

Updated the link, now links to the upload forum.
  • Last Edit: 14 June, 2005, 05:43:24 PM by Preuss

Piperec.exe uses a lot of CPU
Reply #2
Works very fine! Now CPU usage hardly registers.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
       - Oceania Association of Autonomous Astronauts

  • Preuss
  • [*][*]
Piperec.exe uses a lot of CPU
Reply #3
Quote
Works very fine! Now CPU usage hardly registers.
[a href="index.php?act=findpost&pid=305789"][{POST_SNAPBACK}][/a]


You are welcome, and I'm happy it works.
  • Last Edit: 14 June, 2005, 05:43:46 PM by Preuss

Piperec.exe uses a lot of CPU
Reply #4
I forgot the obvious: Thank You!

I think you should leave it up at least a couple of days to give people a chance to show whether there's any interest.....
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
       - Oceania Association of Autonomous Astronauts

  • johny5
  • [*][*][*]
Piperec.exe uses a lot of CPU
Reply #5
I've never heard of this program but it sounds good. Im gonna give it a try. And thank you for fixing the bug  Preuss.

LOL its only 4 kb , this is the smallest program i've ever seen which still is usefull.
  • Last Edit: 13 June, 2005, 02:39:43 PM by johny5

Piperec.exe uses a lot of CPU
Reply #6
Quote
I've never heard of this program but it sounds good. Im gonna give it a try. And thank you for fixing the bug  Preuss.

LOL its only 4 kb , this is the smallest program i've ever seen which still is usefull.
[{POST_SNAPBACK}][/a]

Actually it's the original that's 4,0 KB as it's compressed with [a href="http://upx.sourceforge.net/]UPX[/url]. The fixed version are piperec_fix.exe that's uncompressed and 16,0 KB large. If you compress that one with UPX the result are 4,5 KB.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
       - Oceania Association of Autonomous Astronauts

  • Preuss
  • [*][*]
Piperec.exe uses a lot of CPU
Reply #7
Quote
I think you should leave it up at least a couple of days to give people a chance to show whether there's any interest.....
[a href="index.php?act=findpost&pid=305817"][{POST_SNAPBACK}][/a]

Ok then, I will leave it up for a week or so.

Now I have moved the link to the upload forum ;-)
  • Last Edit: 14 June, 2005, 05:44:33 PM by Preuss

  • Forfit
  • [*][*][*]
Piperec.exe uses a lot of CPU
Reply #8
Piperec now get 50% cpu and crss.exe other 50% about.