* [gentoo-user] Swap performance
@ 2011-05-25 14:20 Alex Schuster
2011-05-25 15:31 ` Paul Hartman
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Alex Schuster @ 2011-05-25 14:20 UTC (permalink / raw
To: gentoo-user
Hi there!
I still wonder why my KDE4 system starts swapping so early. Until a week
ago, I had 6G of RAM, but after a day of being logged in, I usually had some
swap usage. Sometimes this goes up to 1.5G, this is when the system becomes
way too slow and I log out.
Normally I don't mind having swap, I always had. But to me it looks like
this is worse than it should be. From the point when swapping starts, it's
nearly permanent, like, when switching applications and desktops. As if
important stuff were swapped out that will be needed again soon. While
unimportant stuff stays in memory.
This was even worse when using the ati-drivers/fglrx, but at the moment
I'm using xf86-video-ati with xorg-server-1.10.1.901 and KMS.
echo 1 > /proc/sys/vm/drop_caches helps a little, but not much. And not
for long.
Sometimes I quit memory-hungry applications like Kontact, Amarok and TV
Browser and restart them immediately afterwards. Memory usage has
dropped, and desktop switching is fast again, once I went to every desktop
so that stuff will be swapped in. BTW, vm.swappiness is set to 20.
Or I do a 'swapoff -a && swapon -a', this empties the swap and also
frees memory. But this takes _quite_ _a_ _while_. Once I measured 37 minutes
to clear 1G of swap.
But I do not remember how much memory was being used then, so I tried
again, after closing memory-intensive applications:
weird ~ # free -m
total used free shared buffers cached
Mem: 5721 4184 1536 0 34 111
-/+ buffers/cache: 4039 1682
Swap: 4093 885 3208
weird ~ # time swapoff -a
real 27m8.757s
user 2m12.284s
sys 21m37.089s
weird ~ # free -m
total used free shared buffers cached
Mem: 5721 4785 936 0 53 409
-/+ buffers/cache: 4322 1398
Swap: 0 0 0
So, 27 minutes to put 885MB of swap back into RAM, with the double amount of
that being free RAM. I monitored with iotop, and the transfer rate started
around 60-100 K/s, later it went higher. But the average transfer rate is
550K/s. Shouldn't swap be, like, a little faster?
My swap is on an LUKS-encrypted LVM volume, but I tried with a fresh new
LVM volume, and it was a little better only. The SATA drive gives 80-100
MB/s according to hdparm -t. dd'ing /dev/zero directly to the swap volume
gives around 100 MB/s.
I'm running ck-sources 2.6.38, but I experience this for a long time
now, and changed from tuxonice-sources (another thing that just doesn't
work well for me) to ck-sources, to try if this would improve things. I
even cloned a .config from some live cd, in case I had some stupid option
activated that slowed things down.
Lowering swappiness helped, as did more memory. With 3.7G of RAM, KDE4
was barely usable. But two years ago, when this PC was new, I ran KDE 4.2 on
x86, compiled all except OpenOffice in tmpfs, often had a virtual
machine running in VMplayer, and it was fine.
I sure run lots of applications (Kontact, Amarok, TV Browser which uses an
incredible amount of RAM), some Dolphins, some Konsoles, a few Konquerors,
about 15-26 Chromium tabs, KMyMoney, some editors, sometimes Qt Creator, and
some Okulars. When I file some photos from my camera with Digikam, I
normally do not close it afterwards, hoping that it gets swapped out if
needed, and unless I start using it again this should not cost too much of
my RAM. This has always been my style of working, I don't like to close an
applications just after working with it. And it was fine in the past, with
much less memory, and with a virtual machine running all of the time.
Now I got another 2G of RAM, and things are better. But still, I have 800M
of swap right now, without using special applications or VMs. At this
moment, it's not problem, there is no paging going on. A little while ago,
it was quite noticeable. I was running rdiff-backup stuff at that moment,
but so I am doing now. Weird.
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.
Wonko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 14:20 [gentoo-user] Swap performance Alex Schuster
@ 2011-05-25 15:31 ` Paul Hartman
2011-05-25 16:58 ` Volker Armin Hemmann
2011-05-25 22:40 ` Alex Schuster
2011-05-25 16:49 ` Alan McKinnon
2011-05-25 16:53 ` Volker Armin Hemmann
2 siblings, 2 replies; 15+ messages in thread
From: Paul Hartman @ 2011-05-25 15:31 UTC (permalink / raw
To: gentoo-user
On Wed, May 25, 2011 at 9:20 AM, Alex Schuster <wonko@wonkology.org> wrote:
> Hi there!
>
> I still wonder why my KDE4 system starts swapping so early. Until a week
> ago, I had 6G of RAM, but after a day of being logged in, I usually had some
> swap usage. Sometimes this goes up to 1.5G, this is when the system becomes
> way too slow and I log out.
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.
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.
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).
>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.
My worst memory offenders, by resident memory:
clamd 124M
denyhosts 114M
X 75M
plasma-desktop 56M
By virtual memory:
krunner 964M
wicd-client (python) 681M
plasma-desktop 643M
kded4 581M
>Or I do a 'swapoff -a && swapon -a', this empties the swap and also
>frees memory. But this takes _quite_ _a_ _while_. Once I measured 37 minutes
>to clear 1G of swap.
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!
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 14:20 [gentoo-user] Swap performance Alex Schuster
2011-05-25 15:31 ` Paul Hartman
@ 2011-05-25 16:49 ` Alan McKinnon
2011-05-26 20:49 ` Mick
2011-05-25 16:53 ` Volker Armin Hemmann
2 siblings, 1 reply; 15+ messages in thread
From: Alan McKinnon @ 2011-05-25 16:49 UTC (permalink / raw
To: gentoo-user
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
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 14:20 [gentoo-user] Swap performance Alex Schuster
2011-05-25 15:31 ` Paul Hartman
2011-05-25 16:49 ` Alan McKinnon
@ 2011-05-25 16:53 ` Volker Armin Hemmann
2011-05-25 20:07 ` Alan McKinnon
2011-05-25 22:18 ` Alex Schuster
2 siblings, 2 replies; 15+ messages in thread
From: Volker Armin Hemmann @ 2011-05-25 16:53 UTC (permalink / raw
To: gentoo-user
On Wednesday 25 May 2011 16:20:58 Alex Schuster wrote:
> So, 27 minutes to put 885MB of swap back into RAM, with the double amount of
> that being free RAM. I monitored with iotop, and the transfer rate started
> around 60-100 K/s, later it went higher. But the average transfer rate is
> 550K/s. Shouldn't swap be, like, a little faster?
no, sounds about right. Swap in linux is brain damaging slow. If you think
about it your gall bladder might explode. That slow.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 15:31 ` Paul Hartman
@ 2011-05-25 16:58 ` Volker Armin Hemmann
2011-05-25 19:34 ` Paul Hartman
2011-05-25 20:03 ` Alan McKinnon
2011-05-25 22:40 ` Alex Schuster
1 sibling, 2 replies; 15+ messages in thread
From: Volker Armin Hemmann @ 2011-05-25 16:58 UTC (permalink / raw
To: gentoo-user
On Wednesday 25 May 2011 10:31:19 Paul Hartman wrote:
> 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!
you are comparing apples with oranges (harddisks with moving arms with solid
state devices).
Do yourself a favour. Look up how long a harddisk needs to position its head.
Now you can calculate how many times a second a harddisk can position its
head.
Now remember: swap is stupid, so lots and lots of head movement needed (and a
cash flush is running too - so even more movements to write all that crap to
disk),
The result: the whole mess is fscking slow.
You can have a nice fat raid with nice and fast harddisks - if you try to
stream to a 15 year old DLT drive with 5/10mb/sec speed the dlt drive will
constantly rewind - because harddisks suck when they have to seek. And swap
(just like a backup) = lots and lots and lots of seeks.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 16:58 ` Volker Armin Hemmann
@ 2011-05-25 19:34 ` Paul Hartman
2011-05-25 20:03 ` Alan McKinnon
1 sibling, 0 replies; 15+ messages in thread
From: Paul Hartman @ 2011-05-25 19:34 UTC (permalink / raw
To: gentoo-user
On Wed, May 25, 2011 at 11:58 AM, Volker Armin Hemmann
<volkerarmin@googlemail.com> wrote:
> On Wednesday 25 May 2011 10:31:19 Paul Hartman wrote:
>
>> 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!
>
> you are comparing apples with oranges (harddisks with moving arms with solid
> state devices).
>
> Do yourself a favour. Look up how long a harddisk needs to position its head.
Yeah, measuring speed in microseconds versus milliseconds. :)
My SD read/write speed is about 0.9MB/sec in benchmark, and about 2
MB/sec in real-life swap usage. Based on Alex's timings it seems his
HDD is getting about 0.5 MB/sec in swap usage. HDD benchmark random
read/write is usually faster than that. But probably you're right and
the seek operations are really killing it. HDD is about 20 times
slower than SD card in seeking.
If he has a USB flash drive, or memory card reader, he can use it for
swap and see if it's any better or worse. I am curious how it will
compare.
Or, if he has multiple disks, he could create more swap partitions
with equal priority and kernel will stripe/load balance automatically,
hopefully improving his swap performance.
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. :)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 16:58 ` Volker Armin Hemmann
2011-05-25 19:34 ` Paul Hartman
@ 2011-05-25 20:03 ` Alan McKinnon
2011-05-25 20:38 ` Alex Schuster
1 sibling, 1 reply; 15+ messages in thread
From: Alan McKinnon @ 2011-05-25 20:03 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 18:58 on Wednesday 25 May 2011, Volker Armin
Hemmann did opine thusly:
> On Wednesday 25 May 2011 10:31:19 Paul Hartman wrote:
> > 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!
>
> you are comparing apples with oranges (harddisks with moving arms with
> solid state devices).
>
> Do yourself a favour. Look up how long a harddisk needs to position its
> head.
>
> Now you can calculate how many times a second a harddisk can position its
> head.
>
> Now remember: swap is stupid, so lots and lots of head movement needed (and
> a cash flush is running too - so even more movements to write all that
> crap to disk),
>
> The result: the whole mess is fscking slow.
>
> You can have a nice fat raid with nice and fast harddisks - if you try to
> stream to a 15 year old DLT drive with 5/10mb/sec speed the dlt drive will
> constantly rewind - because harddisks suck when they have to seek. And swap
> (just like a backup) = lots and lots and lots of seeks.
That reminds me of how SSDs ought to be much faster than hard disks.
But every time I use my Acer netbook (8G SSD) I curse and swear and commit
random acts of violence - that first gen SSD controller is the worst possible
thing to ever hit computers. I swear the 4G SDHC expansion card is leaps
faster....
(completely OT, I know. I'll keep quiet now.)
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 16:53 ` Volker Armin Hemmann
@ 2011-05-25 20:07 ` Alan McKinnon
2011-05-26 13:32 ` Sebastian Beßler
2011-05-25 22:18 ` Alex Schuster
1 sibling, 1 reply; 15+ messages in thread
From: Alan McKinnon @ 2011-05-25 20:07 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 18:53 on Wednesday 25 May 2011, Volker Armin
Hemmann did opine thusly:
> On Wednesday 25 May 2011 16:20:58 Alex Schuster wrote:
> > So, 27 minutes to put 885MB of swap back into RAM, with the double amount
> > of that being free RAM. I monitored with iotop, and the transfer rate
> > started around 60-100 K/s, later it went higher. But the average
> > transfer rate is 550K/s. Shouldn't swap be, like, a little faster?
>
> no, sounds about right. Swap in linux is brain damaging slow. If you think
> about it your gall bladder might explode. That slow.
For years now I've considered only two possible uses for linux swap:
- a teeny small one just for wiggle room to try and hold that POS called the
oom killer at bay
- a bigger one the same size as total RAM, as a place to put the suspend image
Every other usage makes no sense at all (RAM being so cheap and all). In fact,
I've banned swap on all company servers except databases.
I'd be interested to hear any current use cases where swap delivers a provable
benefit.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 20:03 ` Alan McKinnon
@ 2011-05-25 20:38 ` Alex Schuster
0 siblings, 0 replies; 15+ messages in thread
From: Alex Schuster @ 2011-05-25 20:38 UTC (permalink / raw
To: gentoo-user
Alan McKinnon writes:
> That reminds me of how SSDs ought to be much faster than hard disks.
>
> But every time I use my Acer netbook (8G SSD) I curse and swear and commit
> random acts of violence - that first gen SSD controller is the worst possible
> thing to ever hit computers. I swear the 4G SDHC expansion card is leaps
> faster....
>
> (completely OT, I know. I'll keep quiet now.)
Ah, it's okay, we all need this from time to time :)
Wonko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 16:53 ` Volker Armin Hemmann
2011-05-25 20:07 ` Alan McKinnon
@ 2011-05-25 22:18 ` Alex Schuster
1 sibling, 0 replies; 15+ messages in thread
From: Alex Schuster @ 2011-05-25 22:18 UTC (permalink / raw
To: gentoo-user
Volker Armin Hemmann writes:
> On Wednesday 25 May 2011 16:20:58 Alex Schuster wrote:
>
>> So, 27 minutes to put 885MB of swap back into RAM, with the double amount of
>> that being free RAM. I monitored with iotop, and the transfer rate started
>> around 60-100 K/s, later it went higher. But the average transfer rate is
>> 550K/s. Shouldn't swap be, like, a little faster?
>
> no, sounds about right. Swap in linux is brain damaging slow. If you think
> about it your gall bladder might explode. That slow.
Oh. _That_ slow.
Wonko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 15:31 ` Paul Hartman
2011-05-25 16:58 ` Volker Armin Hemmann
@ 2011-05-25 22:40 ` Alex Schuster
2011-05-26 16:30 ` Volker Armin Hemmann
1 sibling, 1 reply; 15+ messages in thread
From: Alex Schuster @ 2011-05-25 22:40 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 20:07 ` Alan McKinnon
@ 2011-05-26 13:32 ` Sebastian Beßler
0 siblings, 0 replies; 15+ messages in thread
From: Sebastian Beßler @ 2011-05-26 13:32 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
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.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 22:40 ` Alex Schuster
@ 2011-05-26 16:30 ` Volker Armin Hemmann
0 siblings, 0 replies; 15+ messages in thread
From: Volker Armin Hemmann @ 2011-05-26 16:30 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
@ 2011-05-26 17:26 Alex Schuster
0 siblings, 0 replies; 15+ messages in thread
From: Alex Schuster @ 2011-05-26 17:26 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Swap performance
2011-05-25 16:49 ` Alan McKinnon
@ 2011-05-26 20:49 ` Mick
0 siblings, 0 replies; 15+ messages in thread
From: Mick @ 2011-05-26 20:49 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1688 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-05-26 20:50 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 14:20 [gentoo-user] Swap performance Alex Schuster
2011-05-25 15:31 ` Paul Hartman
2011-05-25 16:58 ` Volker Armin Hemmann
2011-05-25 19:34 ` Paul Hartman
2011-05-25 20:03 ` Alan McKinnon
2011-05-25 20:38 ` Alex Schuster
2011-05-25 22:40 ` Alex Schuster
2011-05-26 16:30 ` Volker Armin Hemmann
2011-05-25 16:49 ` Alan McKinnon
2011-05-26 20:49 ` Mick
2011-05-25 16:53 ` Volker Armin Hemmann
2011-05-25 20:07 ` Alan McKinnon
2011-05-26 13:32 ` Sebastian Beßler
2011-05-25 22:18 ` Alex Schuster
-- strict thread matches above, loose matches on Subject: below --
2011-05-26 17:26 Alex Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox