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: High memory usage (Read 33112 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

High memory usage

When I start f2k directlly to my system tray, taskmanager reports 11998k of physycal memory usage and 8612k of virtual memory.
If I double click on the tray icon to open f2k, and then I minimize manually it to the tray, then taskmanager reports 1556k of physical ram, and 8800 of virtual.

Is this that change of memory usage a bug?

My specs are Foobar2000 0.667 with Case MMX optimized plugins (with default ones still happens). No active DSP pluggins, running Windows 2003 standard server.

High memory usage

Reply #1
It does seem bit high. Mine starts at 6000+.

High memory usage

Reply #2
Same problem here.  You actually have to minimize Foobar manually to bring down the memory usage.  (starts at 6mb, goes down to 2,5 here)
The problem is already reported in the developers section.

High memory usage

Reply #3
Seems like numbers reported by task manager are your only problem here, and I don't see anything wrong about foobar2000 itself (not counting any weird components you possibly have loaded) using 10megs.
Please read foobar2000 system requirements before reporting "bugs".
Microsoft Windows: We can't script here, this is bat country.

High memory usage

Reply #4
Quote
Seems like numbers reported by task manager are your only problem here, and I don't see anything wrong about foobar2000 itself


Are you trying to imply that I should just ignore taskmanager in the future since it is complete bollocks anyway.  I am so sorry, but when minimize to system tray is checked Taskmanager always reports high memory usage initially and I really don't see why ,suddenly in this case, this problem should be related to the task manager and not to Foobar.

It really isn't that of a big problem, but does not seem to be intended behaviour.

High memory usage

Reply #5
Ehem.
"Fresh" install of foobar2000 with only default components gives 3.8meg "mem usage" and 1.5meg "VM size" here immediately after startup; the first number (which apparently doesn't have much to do with actual resources used by fb2k) goes down to 400k when minimized.
Of course, you get more memory usage with large database/playlist, since data needs to be stored somewhere; every additional component you install will take some memory too.
Again, I wouldn't consider 10meg "too much" (I actually get ~7meg VM with my usual setup, with full playlist/database loaded, and a bunch of useless components which are there only because they got built by last F7).
Perhaps some people have a problem with their ego, looking at "notepad-ish player" they expect it to use as much memory as notepad itself.
Talking about memory usage going down when minimized - apparently "mem usage" goes down when main window disappears from screen (something with windows OS memory management I think); but foobar2000 also frees its playlist string display cache when minimized (this is intended).
Microsoft Windows: We can't script here, this is bat country.

High memory usage

Reply #6
All of what you say is true and I am very well aware of it.  However Foobar does not free memory when minimized from the command prompt with the window_hide command, if and only if the minimize system tray icon is checked.

The only way to make Foobar free memory, when minimize to system tray is checked, is to click the minimize Icon of the main Window.

You could be right though that that has to do with the Windows memory management.

Absolutely never wanted to imply that Foobar is Notepadish.  Actually the way I've got it configured right now it looks a lot more "stylish" then most players I've used so far (however that is not the reason why I use it).

High memory usage

Reply #7
Again. "Freeing memory on minimize" is a Windows OS thing, probably doesn't affect other programs because they just minimize instead of completely hiding their main window. Please go tell Microsoft about it instead. Only "memory freeing on minimize" I am doing is killing playlist display string cache (playlist item strings that have been displayed recently), which is really small (unless you have a huge playlist and scroll it around like crazy) and hardly matters.
Microsoft Windows: We can't script here, this is bat country.

High memory usage

Reply #8
... another thing - VM size (== actual amount of allocated memory) doesn't appear to change at all when minimized (other than affected by freeing string cache it seems). In other words, "mem usage" in task manager is some useless number they want you to see.
Microsoft Windows: We can't script here, this is bat country.

High memory usage

Reply #9
Quote
Perhaps some people have a problem with their ego, looking at "notepad-ish player" they expect it to use as much memory as notepad itself.

I found something that I thought was funny so I thought I'd share it.  When using notepad and observing the memory usage in the task manager the memory usage also fluctuated as I did various things to it.  At one point it was up to 8.8mb.  So, um, that would put fb2k in the notepad range.  I really don't think it's foobars problem. 

Oh and wait, I just tried calc.exe and was able to get it up to 13mb.  B)

Quote
In other words, "mem usage" in task manager is some useless number they want you to see.

Agreed.

High memory usage

Reply #10
I once thought it might be the amount of physical memory in use, but I've seen it creep higher than the VM size figure.

High memory usage

Reply #11
If you are completely paranoid about memory usage, it seems to help (as in: slightly reduces both reported "mem usage" and "VM size") to de-UPX foobar2000 binaries (AFAIK all official binaries on the site are UPX'd, while those I use aren't).
Microsoft Windows: We can't script here, this is bat country.

High memory usage

Reply #12
Sorry if I seemed to be complaining in my previous post. Was just stating my observations in Taskman .
Windows sure is funny in memory management. The high initial memory usage may possibly be the GUI in my case, as I enabled transparency.
But miminising the window always works. Anyway, I don't have the right to complain, since my box has half a GB of RAM.

 

High memory usage

Reply #13
Sorry to resurrect an old thread, but here's some information that will hopefully clear things up a bit.

When an application window is minimized, Windows trims the working set, and pages out unused RAM.  For any developers reading this, it means that Windows calls SetProcessWorkingSetSize() and passes -1 for both Min and Max sizes.

Read more at the links below.

MS KB 293215

MSDN: SetWorkingProcessSetSize()

If you want the closest approximation of how much RAM an application is taking up, check the VM Size in Task Manager.  You'll have to goto View -> Select Columns... from the Processes tab to enable it.  Even still, this number may not be very accurate because it doesn't take shared DLL usage into account.

If you want to know more without reading a book on the internals of Win2k/XP, check out these posts from DriverGuru in the Ars Technica forums.

High memory usage

Reply #14
Understanding Windows Memory Allocation

Quote
But this is only a part of the total virtual memory allocated by all the processes. i.e. the "VM size" label on the processes tab is misleading. This is simply process-private, writeable virtual address space. It's what the Performance applet calls "Private bytes" for each process, and system-wide calls "Committed bytes".

The sum of the actual pagefile usage, plus the physical memory used to realize such virtual address space, is what shows up as "committ charge", et al. You can think of this figure as the maximum potential pagefile usage: If somehow everything in RAM had to be dropped to make room for other stuff, this is how much pagefile space would be needed. Some of it will usually already be in the pagefile at any given moment.

If you want to know the current actual pagefile usage, get the current pagefile size from either explorer or the system control panel applet, then look at the "%usage" counter under the Pagefile object in the Performance applet, and multiply.


Theres a lot more as well.