FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-25-2011, 10:40 PM
Alex Schuster
 
Default Swap performance

Paul Hartman writes:

> On Wed, May 25, 2011 at 9:20 AM, Alex Schuster <wonko@wonkology.org> wrote:

> I can't remember the last time my swap was used at all. I have 12G of
> RAM, but in my prior system with 8G it was the same. Only in a rare
> case when some program had run-away memory usage/memory leak did I
> ever get to swap usage... I'm using vanilla kernel 2.6.39 with no
> patches, no BFS. And I use proprietary nvidia-drivers. I normally
> don't have so many programs running at once, but it happens sometimes.

Maybe I should have bought 4G instead of 2G, so I'd have 10G, not 8G.
I'm not sure if this is recommended these days, to have one memory bank
with 4G and 3 others with 2G each.

> Since 2.6.38 and enabling automatic process grouping, I don't use nice
> or ionice at all anymore. I do parallel emerge with -j along with make
> -j12 and never notice any slowdown or lag in UI at all.

This is okay now, since I started using the pf-sources. But I have no
explanation, I have been using the BFS scheduler already before with
ck-sources.

> With KDE4 logged in, and no GUI apps running (other than knutmon and
> wicd), my RAM usage is slightly less than 900M (not counting
> filesystem caches).

I don't want to log out now, but I have logs of experiments I did half a
year ago. After a reboot, at the KDM login screen, the +/- buffers/cache
line of free -m output showed 244M used. After logging into KDE4, it's
2954M, but I have maby apps (Konsoles, Kontact, Amarok, TV-Browser,
Dolphin, Chromium) being started automatically.

>> BTW, does anyone else's kwin use 750M? That's pretty high, I think it used
>> to be more like 300M.
>
> My kwin (4.6.3-r1) has currently 507M VIRT, 54M RES, 37M SHR according to top.

It's growing: 1405m VIRT, 851m RES, 6m SHR. Strange, I did not actually
use the desktop after I wrote the mail you replied to, currently I'm
logged in from remote.
And it grows while I compose this mail, about 1M every 2 minutes. This
is not normal, though.

I use a little script to create a log file with some memory information,
and when I grep these 50 files for the kwin process, I see memory usage
between 410M and 520M mostly. Three were higher, up to 1.4G, but these
were plasma bugs (suddenly haveing eight activities instead of one; and
a problem of the file watcher plasmoid with very large log files).
I also found one log with kwin using only 154M, but that was when I had
KDE 3.5 running


> My worst memory offenders, by resident memory:
> clamd 124M
> denyhosts 114M
> X 75M
> plasma-desktop 56M

kwin 851
kontact 385
java 373 (TV-Browser, this is also growing)
X 124
okular 115
chrome 110
chrome 106
mysqld 93
...

BTW, with each Chromium tab being a single process, I wonder which tab
uses 100M of RAM.


> My PC doesn't swap, but in my Nokia N900, it runs Linux and X, heavy
> use of gtk and Qt4 libs, it has 256M of RAM and 768M of swap on eMMC
> (transfer rate about 20MB/sec). It swaps like crazy. Usually there
> is more swap in use than RAM, actually.
>
> When I move the swap to a slow SD card instead (2MB/sec transfer
> rate), even in that slow device, swapoff on the eMMC swap partition
> with ~500M in-use takes about 2 or 3 minutes at most with the data
> being swapped slowly into the SD card.
>
> So I think in your case it should be much faster than that!

Or not, with the large access times of hard drive. I don't know how
large the chunks of memory stored in swap are, I thought some megabytes
at least. Does anyone have an idea? I'd ask Volker, but I'm worried
about his gall bladder.


From another mail:

> Or better yet, figure out why his system is swapping at all which is
> what he was going for I think. With 8 GB I think he should be able to
> disable swap entirely anyway.

That's what I think, too. As I wrote, I always used to have many
applications open, and in the past this was no problem. If anyone is
interested, there are some screenshots of my desktop here:
http://www.wonkology.org/comp/desktop/
The 2010-11-28 shows the six desktops I have now, shortly after login.
It's made half a year ago, but my desktop still looks quite similar.
right now I have some extra stuff running, but not very much.

And looking at the 3x3 desktops in one image (desktop3x3.png) from 2004,
I see I was using 856M of RAM and 748M of swap then. With a Windows VM,
a Mozilla window, some 15 or more Galeon tabs, and some more stuff.
Without big performance problems. It might have taken a little while
before the Windows VM became fully responsive, but I did not have the
constant swapping I experience now.

Wonko
 
Old 05-26-2011, 01:32 PM
Sebastian Beßler
 
Default Swap performance

Am 25.05.2011 22:07, schrieb Alan McKinnon:

> I'd be interested to hear any current use cases where swap delivers a provable
> benefit.

I need swap to build openoffice/libreoffice, my 8GB of RAM are not
sufficient all the time for the tmpfs of /var/tmp/portage when building
that.


But aside of that swap is useless and absolutly overrated. I have
swapness set to 5 and work with that without problems for nearly a year
now.
 
Old 05-26-2011, 01:32 PM
Sebastian Beßler
 
Default Swap performance

Am 25.05.2011 22:07, schrieb Alan McKinnon:

> I'd be interested to hear any current use cases where swap delivers a provable
> benefit.

I need swap to build openoffice/libreoffice, my 8GB of RAM are not
sufficient all the time for the tmpfs of /var/tmp/portage when building
that.


But aside of that swap is useless and absolutly overrated. I have
swapness set to 5 and work with that without problems for nearly a year
now.
 
Old 05-26-2011, 04:30 PM
Volker Armin Hemmann
 
Default Swap performance

On Thursday 26 May 2011 00:40:21 Alex Schuster wrote:
> Paul Hartman writes:
> > On Wed, May 25, 2011 at 9:20 AM, Alex Schuster <wonko@wonkology.org>
> > wrote:
> >
> > I can't remember the last time my swap was used at all. I have 12G of
> > RAM, but in my prior system with 8G it was the same. Only in a rare
> > case when some program had run-away memory usage/memory leak did I
> > ever get to swap usage... I'm using vanilla kernel 2.6.39 with no
> > patches, no BFS. And I use proprietary nvidia-drivers. I normally
> > don't have so many programs running at once, but it happens sometimes.
>
> Maybe I should have bought 4G instead of 2G, so I'd have 10G, not 8G.
> I'm not sure if this is recommended these days, to have one memory bank
> with 4G and 3 others with 2G each.
>

It is very much not recommended nor wise.

Sometimes it works great, sometimes it just works, sometimes it burns down
your village, rapes your cattle and steals your dad.

>
> It's growing: 1405m VIRT, 851m RES, 6m SHR. Strange, I did not actually
> use the desktop after I wrote the mail you replied to, currently I'm
> logged in from remote.

and you know that those numbers are pretty much meaningless?

about swap:

8gb ram, 24gb swap here. Swap so huge because of historical reasons (started
with one disk with 8gb, now there are three...). But not so bad, considering
all those tempfs mounts that can shoved in there.

Of course I am scared about the shitstorm if that ever happens.

I am using the standard scheduler, no fancy io-scheduling stuff, kernel
2.6.36.6 and can't complain.

Even after a week of uptime I only get 500mb swap. Some cruft still in memory
for some i-dont-know-reasons shoved in the hellhole swap so it won't get in
the way of the more important stuff. Like gwenview. Or vlc.
 
Old 05-26-2011, 05:26 PM
Alex Schuster
 
Default Swap performance

Volker Armin Hemmann writes:

> On Thursday 26 May 2011 00:40:21 Alex Schuster wrote:
> > Paul Hartman writes:
> > > On Wed, May 25, 2011 at 9:20 AM, Alex Schuster <wonko@wonkology.org>
> > > wrote:

> > Maybe I should have bought 4G instead of 2G, so I'd have 10G, not 8G.
> > I'm not sure if this is recommended these days, to have one memory bank
> > with 4G and 3 others with 2G each.
>
> It is very much not recommended nor wise.
>
> Sometimes it works great, sometimes it just works, sometimes it burns
> down your village, rapes your cattle and steals your dad.

Ookay.


> > It's growing: 1405m VIRT, 851m RES, 6m SHR. Strange, I did not actually
> > use the desktop after I wrote the mail you replied to, currently I'm
> > logged in from remote.
>
> and you know that those numbers are pretty much meaningless?

Are they? Well, apparently _something_ in kwin was using hundreds of
megabytes. When I was back at the PC, I had to wait three minutes until he
password dialog appeared so I could unlock the session. iotop showed the
kwin process swapping, and no other activity.
Now kwin is at 37M, which is much lower than I thought... whoops, I made a
mistake in my previous posting, I got the virtual memory column instead by
misusing awk. I also confused kwin with plasma-desktop, which had been
really high in the past.

> about swap:
>
> 8gb ram, 24gb swap here. Swap so huge because of historical reasons
> (started with one disk with 8gb, now there are three...). But not so
> bad, considering all those tempfs mounts that can shoved in there.

Yikes. I'd rather use the space for other stuff... no matter how large hard
drives are, mine tend to fill up so I am glad for every extra gigabyte I can
find.

> Of course I am scared about the shitstorm if that ever happens.
>
> I am using the standard scheduler, no fancy io-scheduling stuff, kernel
> 2.6.36.6 and can't complain.

I do, a lot. But it seems that the system performs okay now.

> Even after a week of uptime I only get 500mb swap. Some cruft still in
> memory for some i-dont-know-reasons shoved in the hellhole swap so it
> won't get in the way of the more important stuff. Like gwenview. Or vlc.

Yeah, that's how it should be. A little swap is okay. But in my case it felt
like important stuff was swapped out.

Wonko
 
Old 05-26-2011, 08:49 PM
Mick
 
Default Swap performance

On Wednesday 25 May 2011 17:49:29 Alan McKinnon wrote:
> Apparently, though unproven, at 16:20 on Wednesday 25 May 2011, Alex
> Schuster
>
> did opine thusly:
> > Oh, even weirder: The phone just rang, and five minutes later, swap has
> > gone to 860M. I was running rdiff-backup --list-increment-sizes, maybe
> > this uses much memory, and caches the stuff. Now the command has
> > finished, and paging has stopped. The rdiff-backup process itself does
> > not use much memory.
> >
> > BTW, does anyone else's kwin use 750M? That's pretty high, I think it
> > used to be more like 300M.
>
> I've been noticing this kind of thing too for a while now. In my case it's
> the nepomuk/akonadi/virtuoso stack doing it - it seems to trigger full
> scans at weird times and does other special things after a resume from
> suspend.
>
> Virtuoso can sometimes get as high as 800M RES memory in top. Which is all
> quite bizarre, I suspect a dodgy config on my part.
>
> As for kwin - what column are you reading the value from? Here kwin uses
> more like 60M

This is kwin usage from a 32bit Pentium 4 box with 3G of RAM:

VIRT SHR RES
143m 22m 29m

At this moment I am compiling chromium (which will take close to 2 hours) and
it's eaten up 1560K swap. Under normal usage the 3G or RAM is more than
adequate. Small amounts of swapping happen only when I emerge something large
(e.g. OOo) or when I fire up VirtualBox and have umpteen apps open, browsers
with dozens of tabs, etc.

PS. I have switched off desktop search and although I can see akonadi/nepomuk
there's no virtuoso, strigi or other such stuff showing up.
--
Regards,
Mick
 

Thread Tools




All times are GMT. The time now is 12:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org