Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Unexpected CPU usage with foobar2000 (Read 11844 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Unexpected CPU usage with foobar2000

Reply #25
Seems like enabling Equalizer and probably some other DSP's can also bting up cpu usage quite a lot.  EQ puts  cpu usage up on a pretty fast machine (Athlon 2200) from 0% to up to 8% during playback.

(Just meant as an observation, not a complaint)

Unexpected CPU usage with foobar2000

Reply #26
inet streaming and usage

its an old system
333 amd-k6  256mb pc100 ram
foobar2000 0.667
playback thread priority max - tried on next to lowest setting and same result
attenuator only dsp active
replay gain shut off
resampler not loaded but set to 44100 with internal set at 32
output waveout
direct sound - primary sound driver - allow hardware mixing is not checked
waveout - microsoft sound mapper and buffer 1000 ms

When listening to internet radio, the whole machine is sluggish and slow.
When listening to mp3's on the harddrive everything works fine.

It seems that internet streaming is the problem with high cpu usage, at least on this machine.

Is there anything I can do or change so that I can use foobar2000 to listen to internet radio?
or is this machine just too slow for it?

Thank you for creating foobar2000 - it works great offline.

Unexpected CPU usage with foobar2000

Reply #27
xbenchman, you are having the same problem I have noticed. Winamp plays the same stream with no issues for me, so it sounds like something that could be tweaked...hopefully without too major a rework of the plugin. But, as always, it is likely that I am completely wrong  .

Unexpected CPU usage with foobar2000

Reply #28
Thikasabrik

I never messed much with winamp but I got tired of guessing what song was playing when using coolplayer.
The internet parser is not working or has not been coded...not sure which is the case.
I have been using foobar for a while and all seems fine with the exception of internet radio.  foo is playing from the harddrive right now and there is no trouble with slow/sluggish response or skipping (stuttering) while playing.  But if I connect to an internet radio station everything slows down and it plays choppy and skips (stutters) frequently.

I went so far as to rename several of the dll files in foo's folder so they would not load on start up.  I went through the configuration screens and set to default and then shut everything off that I thought I could.  It helped with startup time of foo but didn't make much of a difference while listening to an internet radio station.  It acted similarly with the skipping and stuttering.

Foobar works well on the other machine.  1200 amd with 512 ram and all dlls loading.  I thought maybe foo was just too much for this machine.  If it is then so be it.  I will listen to the regular radio.  But if it can be tweaked so that it works on slower machines that would be great.

Unexpected CPU usage with foobar2000

Reply #29
Current inet reader is trash, it's a well-known fact. This thing will be hopefully getting replaced soon.
Microsoft Windows: We can't script here, this is bat country.

Unexpected CPU usage with foobar2000

Reply #30
Tested again.  And it seems that the EQ is the only (standard) DSP that brings up CPU usage.  But it does so drastically.

Unexpected CPU usage with foobar2000

Reply #31
Thanks zZzZzZz

I thought I was going crazy.  I searched for cpu/ram usage...but obviously I missed the fact about the inet reader.

Thanks again...will be looking forward to a new internet reader.

edit
Thank You for Foobar.  Very nice

Unexpected CPU usage with foobar2000

Reply #32
Quote
Ok, well, I've looked at it some more now...

Dsound output (hw mixing)...

Resampler - playing from disk: Spends most time at 0%, but every second or so task manager reports it leaping up to anywhere between 8% and 37% for about half a second. (update rate: high)

No Resampler - playing from disk: Pretty much the same.

Resampler - playing from inet: Spends most time around 18%. Soemtimes up to 33% or so.

No Resampler - playing from inet: Spends most time around 8%.

Kxmixer is closed throughout. Btw, I don't know what fb2k does different to winamp in this respect, but winamp's cpu usage varies between 0 and 4% without resampler with your dsound plugin. Is this due to additional internal precision with fb2k? Or something else?

Maybe I'll test my vortex2 celeron 500 machine later...

Your report is basically identical to my symptoms.  I removed all DSP's, and tested foobar with both DSound and Kernel Streaming (just for kicks) and regardless, I always saw, as you put it: "Spends most time at 0%, but every second or so task manager reports it leaping up to anywhere between 8% and 37% for about half a second."

Note that I'm a Creative SBLive Official Driver (07-2002) User.  [on a fairly clean and recent install of WinXP]

Perhaps I'm not reading close enough, but I haven't seen this addressed yet.  Would someone mind spending a minute either explaining what's happening or at least pointing me to a post which has the answer?

Unexpected CPU usage with foobar2000

Reply #33
OK,  no time to comment now,  I'll be back later..  but here's a wierd clue..

Virus scanner?

Check what programs are using the cpu...

Unexpected CPU usage with foobar2000

Reply #34
Quote
inet streaming and usage

its an old system
333 amd-k6  256mb pc100 ram
foobar2000 0.667
playback thread priority max - tried on next to lowest setting and same result
attenuator only dsp active
replay gain shut off
---> resampler not loaded but set to 44100 with internal set at 32


Don't know if you mean this is the resampler settings,  or the bit output settings in "Playback"?

Quote
output waveout
direct sound - primary sound driver - allow hardware mixing is not checked
waveout - microsoft sound mapper and buffer 1000 ms

Is there anything I can do or change so that I can use foobar2000 to listen to internet radio?
or is this machine just too slow for it?

Thank you for creating foobar2000 - it works great offline.


OK,  I assume the DS settings don't matter if you are selecting Waveout?
I'm not sure if you might find DS taking less cpu than Waveout..

Unexpected CPU usage with foobar2000

Reply #35
Now time to explain my cryptic (and wierd) post..

I noticed this going on..  went to the program manager (XP system) and saw that FB was taking 0-2%,  it was my VIRUS SCANNER of all things, that was logging the bursts to 30% cpu!!

OK, so the inet stream comes into a buffer somewhere, and the scanner thinks it's some kind of download and is capturing then scanning a buffer of data..  and a burst of cpu?  I could be wrong here, but that's what it looks like...

I was playing with things to see what was up..  noticed the once a second behavior when I had the output set to 24 bit..  then back to once every 5-10 seconds with 16 bit.  Resampler off, on, no matter.  On my system (AMD 1Ghz) all the rest of that,  moves me from 0-2%,  to maybe 2%.

To investigate further,  I played files,  no peaks,  even with resampler..  BUT,  if I changed output to 24 bit (or anything besides 16) I got the same peaky behavior I was seeing with the inet stream, BUT there was no use by the virus scanner.  Actually,  I couldn't see any file peaking up, despite seeing the total cpu figure jump up every few seconds.  The task manager dosen't sample fast enough?  Wierd..

So,  it looks like I see a partial cause,  but something different happens (maybe) for files, then for inet streams.    I would suggest not using something other than 16 bit output,  it seems to add load in either case.

Other than that I'm still confused... 

So how many out there have a virus scanner?  (using McAfee here)

Another note,  something that REALLY loaded things down was the Slow Mode in the Resampler..  brought my system to a continous 30%,  keep that one off!

And yet another note,  just crosschecked by turning off my virus scanner..  now no peaks on inet streams, but when I change the output, back to 40% peaks every 4 seconds with no program visibly running it up.

Unexpected CPU usage with foobar2000

Reply #36
JonPike

---> resampler not loaded but set to 44100 with internal set at 32

Resampler shows up in dsp manager but it is in the right column not the left column.  I am figuring that this means it is not loaded.  However, in the dsp manager area, resampler is listed and on that screen target mode is 44100, slow mode is not checked, and for internal it is set at 32 (bits?).  I chose 44100 to alleviate the potential of having the resampler run.

For direct sound
The options page has my device as the primary sound driver
Allow hardware mixing is not checked
Buffer length is 1000 ms (default)
Here's the catch why I am not using it.  In the device info box I am getting errror finding device.  I think this has to do with the fact that it is a soudblaster 16.  Yes, I said she was an old machine.  I guessed that the error meant it was not a supported feature.  I tried it anyhow and it acted nearly the same.  The stuttering was not as frequent but still there none the less.

In an earlier post by zZzZzZz, he states that the inet is reader is "trash".  I am going to wait until a newer version is released before I continue to pull my hair out.  Foobar plays spendid offline so I agree with zZzZzZz that the problem is stemming from the inet reader and not from any other part of Foobar.

(edit)  I am using avast4 on the old machine and norton on the newer one.  I am not seeing any difference in performance online or offline with them running or shutoff.  I mean it seems to me that the av doesn't matter in my case.

Unexpected CPU usage with foobar2000

Reply #37
Quote
OK,  no time to comment now,  I'll be back later..  but here's a wierd clue..

Virus scanner?

Check what programs are using the cpu...

Well, I took your advice and ran through each program running to determine whether another was to blame for causing the strange peaks in cpu usage.  Please note that foobar was the only program reporting cpu usage in task manager, so this wasn't a very direct case to figure out.  After closing as many programs as possible (including explorer) so as that foobar and task manager were the only progs running, then going through each of the programs outlined in my registry's "run" folder, I narrowed it down... by golly.

It seems YzDock was the culprit.  I thought this was strange at first, but then recalled that as long as the dock is running, the files to which it links are un-modifiable (realized this whenever I tried to update foobar to new version and received the "can't overwrite foobar2000.exe" error).

Anyways, for anyone else who wants to track down Their culprit program, note that you need to stop and restart playback for the strange peak behavior to stop, just closing the culprit program while the music continues to play won't reveal anything.

Here's a depiction of what happens:

[Read: 1) foobar2000 playing, YzDock not loaded| 2) foobar playing, YzDock loaded| 3)foobar stopped, YzDock closed, foobar playback resumed]

I should also mention that I'm running resampler (fast), Attenuator and Advanced Limiter for my DSPs (please don't bash me about not really being able to hear the differences... just let me live by illusion), and my CPU usage stays aroun 0-2%.  Thanks for the help.

Good luck to everyone!

[06-03-2003] Please note my next post in this thread, it seems the problem was not completely erradicated by closing YzDock.  Sorry to get your hopes up.  The very next post explains a possible reason.

Unexpected CPU usage with foobar2000

Reply #38
Another possible reason for weird CPU usage behaviors (actually I've seen CPU usage going up on athlon700 box when browsing pages with a lot of animations in IE) is that fb2k needs more memory bandwitdh (64bit internal precision); perhaps something else taking over CPU cache may cause reported fb2k CPU usage to go up.
Microsoft Windows: We can't script here, this is bat country.

Unexpected CPU usage with foobar2000

Reply #39
I was hoping to quickly edit my last post, but you were too fast for me Z.  In fact, after allowing playback for some time, I noticed the cpu peak behavior return.  I'll have to take your word on the possibility of memory bandwith (hogging), considering I'm all out of ideas.

Unexpected CPU usage with foobar2000

Reply #40
Something I still don't really understand is why foobar2000 eats CPU usage when the KX Mixer is open. I know it has to do with the MIDI stuff as explained earlier in this thread, but since it only happens with the KX Mixer and MIDI (which foobar2000 doesn't use as far as I know) you'd think the KX Mixer would eat CPU usage, but it's foobar2000... WinAMP doesn't show this behaviour in the same conditions.

Below two screenshots of Windows Task Manager:



The upper graph is my system with foobar2000 playing and KX Mixer closed. Replay Gain (track) enabled, following DSPs loaded: Attenuator DSP, Advanced Limiter DSP and Resampler DSP (fast), 16 bit fixed point (SB Live!), triangular dithering, strong ATH noise shaping and DirectSound output. System: P3 1000, 256 MB, Windows XP SP1.

With KX Mixer not loaded foobar2000 takes 0% CPU usage, even with the resampler activated. WinAMP doesn't get any lower than 2-4% on this system. The spikes you see on the upper graph are from my browser. The situation changes drastically when KX Mixer is loaded. Foobar2000 now periodically uses up to over 30%¨of the CPU while WinAMP still uses only 2-4%.

If the problem is really with the KX Mixer I don't get why foobar2000 gets the CPU cycles according to Task Manager.

The situation doesn't change without the resampler or a fresh booted system with only KX and foobar2000 running and all other unneeded applications killed.

Unexpected CPU usage with foobar2000

Reply #41
Well, the kxmixer problem is an interesting one. It doesn't happen for me, so it's likely something about your combination of hardware/software. I think at least on of the kx team has said that this is a known issue for some people.

As for virus scanner's affecting things, my copy of AVG doesn't. It did, however, inspire me to see if Sygate PF was having an effect on inet reading... but it didn't. It is strange how the resampler has such a large effect on the inet stream and not on a file played from disk. I expect I'd have to know a lot more about how data is cached and passed to the output devices etc to know why... But, as has been said, there's no point sulking about it if the inet reader will be fixed.  B)

Unexpected CPU usage with foobar2000

Reply #42
Oh yeah.. for those having problems with usage that seems due to kxmixer, I've just had a thought. With the last few versions, the first device listed (0/1) is set up to be able to receive 5.1 channels and pass it on to surrounder dsp plugin. If you're using stereo streams, try using one of the other devices like (4/5) (depends on how your speakers are connected and how surroudner is set up. It's kind of a shot in the dark, but it might help... maybe.

Unexpected CPU usage with foobar2000

Reply #43
That's not the problem. I already use the DirectSound (Windows XP) 6/7 output (routed to the rear output of my SB Live!). Choosing other outputs like 4/5 or the default don't change the behaviour at all. Same goes for Kernelstreaming or WaveOut...

Unexpected CPU usage with foobar2000

Reply #44
I did some investigating into the drivers installed for my sound card.  According to windows the updated drivers were successfully installed.  Inspecting the version numbers of the updated drivers and the version number of the installed (and used) drivers showed that they were different.  I extracted the updated drivers, renamed them to *.000, and copied them to the folder that the used drivers were located.  I then rebooted into dos and renamed the original driver to *.001 and renamed the copied driver (*.000) to *.drv or *.dll whatever the case was.  Rebooted and checked the device manager to make sure that the updates were successful.  After all of this messing around Foobar is finally streaming audio from the net without the skipping and stuttering like it use to (for me).  It seems that windows does what it thinks is best even though that may not be the case. 

I just wanted to let everyone know that their particular problem may not be a foobar related problem it may be windows related.

Best of Luck

Unexpected CPU usage with foobar2000

Reply #45
got the same.

No DSP Plug In active

Athlon 2000+
nforce2 board
SB Audigy2 with latest drivers.

Unexpected CPU usage with foobar2000

Reply #46
I notice in my Task Manager CPU Usages about 10-15%...

Now i´m using FB2k 0.7RC5

The following DSP´s are in the Chain:
Volume
Equalizer
Dynamics Compressor

If i turn them off, the CPU Usage is 0%.

so... its clear

I using Foobar on a Laptop with 1800 MHz, WinXP SP1, Direct Sound [Acer Travelmate 634LC]

Actually my Question is... What´s the difference between the Winamp EQ and the Fb2k EQ?
I think they use the same engine? Am i fault? Why there is such a big CPU Usage in relation to Winamp?

Nevertheless i stay with foobar... Using it since 0.5 :-)

Thanks for your help!