Re: What is residual memory? Can anyone explain?
On 18 December 2011 18:07, Yedidyah Bar-David linux...@didi.bardavid.org wrote: In addition, I also check free memory before running the app, after starting, several times, etc. That's a good practice as well. Do you do it manually or do you have some background tool which collects this data constantly for review (collectd/ganglia/zabbix/something else?)? --Amos ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: What is residual memory? Can anyone explain?
On Mon, Dec 19, 2011 at 08:31:55AM +1100, Amos Shapira wrote: On 18 December 2011 18:07, Yedidyah Bar-David linux...@didi.bardavid.org wrote: In addition, I also check free memory before running the app, after starting, several times, etc. That's a good practice as well. Do you do it manually or do you have some background tool which collects this data constantly for review (collectd/ganglia/zabbix/something else?)? I personally use none, but can see the value of using some. -- Didi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: What is residual memory? Can anyone explain?
On Fri, Dec 16, 2011 at 09:22:43PM +0200, Raz wrote: i tend to calculate a process' memory consumption in deltas, meaning, how memory it consumes in addition to the shared sections. So i usually take a look at the write-able and private consumption as reported by pmap. ( pmap pid ). Please note, there are numerous discussions of how to estimate system/process memory consumption. Consider for example an in-kernel inode, it is not counted in the process address space even though it serves the process, what about in-flight bio, skbuff ? These problem are very common in the embedded world, we fear of being oomed :) In addition, I also check free memory before running the app, after starting, several times, etc. -- Didi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
What is residual memory? Can anyone explain?
Hi all. I reported a bug in Amarok ( https://bugs.kde.org/show_bug.cgi?id=288876 ) where it sometimes consumes over 10% of my RAM on startup, and it was closed with this comment: Well, there is the virtual memory but it is the residual memory use that matters. Yours us just 371M which is absolutely correct. FWIW: I suggest you read up some documentation on dynamic memory use in Linux. In short: the more memory available, the more will be used, the system distributes this evenly to the running processes depending on their priority. Not a bug. Well, I don't understand it. What is residual memory in this context (as Google searches for it yields junk.), and why is still OK that Amarok consumes so much. Any insights would be appreciated. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Why I Love Perl - http://shlom.in/joy-of-perl C++ supports Object‐Oriented Programming roughly as much as COBOL supports Functional Programming. Please reply to list if it's a mailing list post - http://shlom.in/reply . ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: What is residual memory? Can anyone explain?
On Fri, Dec 16, 2011 at 11:43 AM, Shlomi Fish shlo...@shlomifish.orgwrote: Hi all. I reported a bug in Amarok ( https://bugs.kde.org/show_bug.cgi?id=288876 ) where it sometimes consumes over 10% of my RAM on startup, and it was closed with this comment: Well, there is the virtual memory but it is the residual memory use that matters. Yours us just 371M which is absolutely correct. FWIW: I suggest you read up some documentation on dynamic memory use in Linux. In short: the more memory available, the more will be used, the system distributes this evenly to the running processes depending on their priority. Not a bug. Well, I don't understand it. What is residual memory in this context (as Google searches for it yields junk.), and why is still OK that Amarok consumes so much. Any insights would be appreciated. Regards, Shlomi Fish I would assume he meant RSS[1], as opposed to VSZ ('VIRT' in 'top'). A program can ask for a huge amount of memory but not use it, so it won't actually waste your resources... [1] http://en.wikipedia.org/wiki/Resident_set_size -- Shimi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: What is residual memory? Can anyone explain?
Shlomi Fish shlo...@shlomifish.org writes: Hi all. I reported a bug in Amarok ( https://bugs.kde.org/show_bug.cgi?id=288876 ) where it sometimes consumes over 10% of my RAM on startup, and it was closed with this comment: Well, there is the virtual memory but it is the residual memory use that matters. Yours us just 371M which is absolutely correct. FWIW: I suggest you read up some documentation on dynamic memory use in Linux. In short: the more memory available, the more will be used, the system distributes this evenly to the running processes depending on their priority. Not a bug. Well, I don't understand it. What is residual memory in this context (as Google searches for it yields junk.), and why is still OK that Amarok consumes so much. Well, there are two issues here. 1. I suspect/assume that residual memory means resident set (someone confused resident with residual?). This is the total size of pages mapped in RAM, per process, without VM or process kernel data structures. This has been discussed here before, e.g., http://www.mail-archive.com/linux-il@cs.huji.ac.il/msg31797.html 2. What was it that you considered a bug? The screenshot of top in your bug report shows resident set size (a.k.a. RSS, RES field in top) of 387M, which is consistent with 12.9% of your total 3G of RAM. If this is your complaint (why the process uses so much RAM?) then someone did not read your report attentively enough - I mean, the response can be (mis)construed as you've looked at a wrong field. At the same time, it is not at all clear why they should consider it a bug. Out of curiosity, I started amarok on my F14 box and its RSS is 90M (without doing anything at all). There are other processes (quite a few) running on the machine right now, and this may explain why it is smaller than in your case (you did a clean experment, didn't you?). The app may allocate and preload/cache all sorts of stuff if it can - if there is memory available, why withhold it? This is what they told you, in different words. Finally, I did egrep ^Vm /proc/pid/status and the app's heap is almost 10 times larger than RSS, i.e., stuff was allocated but not mapped. Maybe this is what they had in mind when they said that RSS is what matters. Another datum - the size of shared libraries used, is also significantly (50%) more than RSS. And if you note that RSS counts shared pages as belonging to the process (since they are mapped into the process's virtual memory space) it stops looking so badly. Hope something is clearer than it used to be. -- Oleg Goldshmidt | p...@goldshmidt.org ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: What is residual memory? Can anyone explain?
i tend to calculate a process' memory consumption in deltas, meaning, how memory it consumes in addition to the shared sections. So i usually take a look at the write-able and private consumption as reported by pmap. ( pmap pid ). Please note, there are numerous discussions of how to estimate system/process memory consumption. Consider for example an in-kernel inode, it is not counted in the process address space even though it serves the process, what about in-flight bio, skbuff ? These problem are very common in the embedded world, we fear of being oomed :) On Fri, Dec 16, 2011 at 3:34 PM, Oleg Goldshmidt p...@goldshmidt.org wrote: Shlomi Fish shlo...@shlomifish.org writees: Hi all. I reported a bug in Amarok ( https://bugs.kde.org/show_bug.cgi?id=288876 ) where it sometimes consumes over 10% of my RAM on startup, and it was closed with this comment: Well, there is the virtual memory but it is the residual memory use that matters. Yours us just 371M which is absolutely correct. FWIW: I suggest you read up some documentation on dynamic memory use in Linux. In short: the more memory available, the more will be used, the system distributes this evenly to the running processes depending on their priority. Not a bug. Well, I don't understand it. What is residual memory in this context (as Google searches for it yields junk.), and why is still OK that Amarok consumes so much. Well, there are two issues here. 1. I suspect/assume that residual memory means resident set (someone confused resident with residual?). This is the total size of pages mapped in RAM, per process, without VM or process kernel data structures. This has been discussed here before, e.g., http://www.mail-archive.com/linux-il@cs.huji.ac.il/msg31797.html 2. What was it that you considered a bug? The screenshot of top in your bug report shows resident set size (a.k.a. RSS, RES field in top) of 387M, which is consistent with 12.9% of your total 3G of RAM. If this is your complaint (why the process uses so much RAM?) then someone did not read your report attentively enough - I mean, the response can be (mis)construed as you've looked at a wrong field. At the same time, it is not at all clear why they should consider it a bug. Out of curiosity, I started amarok on my F14 box and its RSS is 90M (without doing anything at all). There are other processes (quite a few) running on the machine right now, and this may explain why it is smaller than in your case (you did a clean experment, didn't you?). The app may allocate and preload/cache all sorts of stuff if it can - if there is memory available, why withhold it? This is what they told you, in different words. Finally, I did egrep ^Vm /proc/pid/status and the app's heap is almost 10 times larger than RSS, i.e., stuff was allocated but not mapped. Maybe this is what they had in mind when they said that RSS is what matters. Another datum - the size of shared libraries used, is also significantly (50%) more than RSS. And if you note that RSS counts shared pages as belonging to the process (since they are mapped into the process's virtual memory space) it stops looking so badly. Hope something is clearer than it used to be. -- Oleg Goldshmidt | p...@goldshmidt.org ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il