HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: Mr_Rabid_Teddybear on 2005-06-13 16:39:15

Title: Piperec.exe uses a lot of CPU
Post by: Mr_Rabid_Teddybear on 2005-06-13 16:39:15
Tried the following with piperec.exe from Case's site (http://www.saunalahti.fi/cse/files/); 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 (http://www.icecast.org/ezstream.php):
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 (http://www.sysinternals.com/Utilities/ProcessExplorer.html). 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.
Title: Piperec.exe uses a lot of CPU
Post by: Preuss on 2005-06-13 17:27:22
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] (http://index.php?act=findpost&pid=305756")

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.
Title: Piperec.exe uses a lot of CPU
Post by: Mr_Rabid_Teddybear on 2005-06-13 18:05:46
Works very fine! Now CPU usage hardly registers.
Title: Piperec.exe uses a lot of CPU
Post by: Preuss on 2005-06-13 19:03:18
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.
Title: Piperec.exe uses a lot of CPU
Post by: Mr_Rabid_Teddybear on 2005-06-13 19:33:27
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.....
Title: Piperec.exe uses a lot of CPU
Post by: johny5 on 2005-06-13 19:37:08
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.
Title: Piperec.exe uses a lot of CPU
Post by: Mr_Rabid_Teddybear on 2005-06-13 19:45:50
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] (http://index.php?act=findpost&pid=305818")

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.
Title: Piperec.exe uses a lot of CPU
Post by: Preuss on 2005-06-13 22:42:52
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 ;-)
Title: Piperec.exe uses a lot of CPU
Post by: Forfit on 2012-05-07 15:06:22
Piperec now get 50% cpu and crss.exe other 50% about.