D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Caching - was out of memory

 

On 06/09/13 17:02, Gordon Henderson wrote:
> On Fri, 6 Sep 2013, Tom wrote:
>
>> IIRC now - one thing the kernel does is cache everything - you open a
>> file and close it and flush it its flushed but its still in memory in
>> case you want to open it again. This is actually pretty cool
>> behaviour and if you've got a big app not written to process a lot of
>> configuration files at startup then the second and subsequent loads
>> are pretty quick compared with the original.
>
> Sure, but it was pretty obvious in my posting that I was on about a
> single program using 1.8GB of ram, not the caching. If you added up
> the buffers + cache it wouldn't equate to 1.8G - which was easy to see
> from the top output.
>
> currently it looks like:
>
> KiB Mem:   3831912 total,  3542060 used,   289852 free,   228892 buffers
> KiB Swap:        0 total,        0 used,        0 free,   848412 cached
>
>   PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
> 13071 gordon    20   0 1961m 1.4g  15m S   0.0 37.2 439:11.46 gnome-shell
>
> Looks like it's grown since this morning too. 1.9GB (And note that the
> cache + buffer totals is only about 1G, so hard to confuse with a
> program using over 1.8G)
>
> So that's one program using 1.4G of real ram with about 0.5G of code
> space/libraries sitting on disk (or paged into RAM) Incredible.
>
> You can drop the caches if you want
>
>   echo 3 > /proc/sys/vm/drop_caches
>
> but it doesn't change what programs thesmselves are using:
>
> KiB Mem:   3831912 total,  3139380 used,   692532 free,      428 buffers
> KiB Swap:        0 total,        0 used,        0 free,   687468 cached
>
>   PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
> 13071 gordon    20   0 1961m 1.4g  15m S   6.3 37.2 440:21.79 gnome-shell
>
> All its doing is wasting memory for no reason that's clear at all.
>
> Gordon
>
>

There might be something a bit wrong there - my gnome-shell memory usage
is constant at ~2.6% no matter how long it runs: that's very roughly
half a gig on a system with 16Gb available.

You've got a brand new AMD APU haven't you - how well is your graphics
stack supported? I wouldn't be surprised if you're not running on direct
rendering and are perhaps falling back to software rendering mode?
That's going to hammer performance.

ghost@failbot:~$ glxinfo | grep -i "direct rendering"
direct rendering: Yes

You may need to tweak your Xorg.conf, driver assignation or some other
tiny and easily missed detail.

I will grant you that 1.9Gb seems like too much for gnome-shell to be
eating up normally.

Regards

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq