You are not logged in.

#1 2009-08-11 20:46:36

Exitium
Member
From: Helsinki, Finland
Registered: 2008-08-20
Posts: 202

Arch is raping my memory

Well, not literally. However, the problem is that when I'm using my computer for couple of hours, memory usage just grows up and never comes down. It is tolerable (10-20%) after booting, but when I continue using my computer memory usage just grows up, slowly, but after a couple of hours RAM usage is daunting high. For example, now my computer has been turned on for about 5 hours and memory usage is 87%. Yesterday it was like 96% or so. Even if I close all of my running (GUI) programs, kill X, and there should not be any background taskes, it is still high. The only fix I know is to reboot.

top - 23:39:11 up  5:07,  2 users,  load average: 0.27, 0.34, 0.31
Tasks: 145 total,   1 running, 144 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.0%us,  0.6%sy,  0.0%ni, 96.0%id,  0.4%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4042500k total,  3576292k used,   466208k free,   508864k buffers
Swap:        0k total,        0k used,        0k free,  1942324k cached
 Unknown command - try 'h' for help
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4233 root      20   0 1030m 187m  17m S    4  4.7   8:41.12 X
 6282 henkka    20   0 1044m 170m  51m S    4  4.3   2:39.54 amarok
 4424 henkka    20   0  548m  93m  36m S    3  2.4   5:37.04 kwin
 4428 henkka    20   0  857m 133m  76m S    3  3.4   4:59.42 plasma-desktop
 9551 henkka    20   0  604m  70m  35m S    1  1.8   0:24.11 arora
 4474 henkka    20   0  491m  70m  31m S    0  1.8   0:58.24 kopete
 9587 henkka    20   0  322m  25m  12m S    0  0.7   0:00.37 konsole
    1 root      20   0  3796  632  540 S    0  0.0   0:00.50 init
    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/0
    4 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0
    6 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/1
    7 root      15  -5     0    0    0 S    0  0.0   0:00.02 ksoftirqd/1
    8 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1

Am I blind or isn't there any specific task which uses almost all of my memory? The only (visible) programs running should be Kopete, Amarok, Arora and XChat, KWin desktop effects turned on.


And, of course, I have 4GB RAM DDRII-800. And I am using 64bit Arch with KDE 4.3 (not KDEmod). Hopefully I'm just a bug dummy and there's nothing serious, because I reinstalled Arch two days ago after 9-12 months, and before that I had 32bit Arch (with Gnome). So there might be something I'm missing.

Edit: And with no other programs running, just KDE without desktop effects, memory usage is 80%...

top - 23:47:47 up  5:16,  2 users,  load average: 0.20, 0.21, 0.24
Tasks: 134 total,   1 running, 133 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.4%us,  0.2%sy,  0.0%ni, 99.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4042500k total,  3225780k used,   816720k free,   526636k buffers
Swap:        0k total,        0k used,        0k free,  1807124k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4428 henkka    20   0  857m  97m  39m S    1  2.5   5:10.21 plasma-desktop
 2553 root      20   0 28436 1164  780 S    0  0.0   0:18.63 g15daemon
 4233 root      20   0 1029m 186m  17m S    0  4.7   8:57.18 X
 4496 henkka    20   0 34264 1196  972 S    0  0.0   0:35.81 g15stats
    1 root      20   0  3796  632  540 S    0  0.0   0:00.50 init
    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/0
    4 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0
    6 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/1
    7 root      15  -5     0    0    0 S    0  0.0   0:00.02 ksoftirqd/1
    8 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1
    9 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/2
   10 root      15  -5     0    0    0 S    0  0.0   0:00.13 ksoftirqd/2
   11 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/2

Last edited by Exitium (2009-08-11 20:49:43)

Offline

#2 2009-08-11 20:52:11

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Arch is raping my memory

linux != windows.
free -m

also.. battletoads.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2009-08-11 20:55:29

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Arch is raping my memory

I have made so many posts like this in these forums, I'm sure you can throw a rock and find one.

Short and sweet: If your memory is not 100% in use, then you wasted your money. Memory is there to be used.

Linux makes aggressive use of caching and buffering, to prevent disk lookups, keep regularly accessed libraries loaded to speed program start time, etc etc

Are you having any performance issues, or are you simply noticing a number? Most people that come from Windows get in the habit of thinking that memory in-use is bad. Stop thinking like that.

Additionally, if you find unaccounted for memory, you may want to look at anything you have mounted as tmpfs or ramfs filesystems. See if those are heavily used (/tmp for instance)

Side note: X using over a gig virtual is a little extreme, though, not sure what it is for other people and other WMs though

Offline

#4 2009-08-11 21:02:44

deej
Member
Registered: 2008-02-08
Posts: 395

Re: Arch is raping my memory

I'd hate it if I spent all that money on 4gig of memory, only for the O.S. to use 500k lol

Seriously, I don't think there's anything to worry about - my system shows similar results
to yours; I've 4gig of DDRII as well. All I have running are thunderbird, opera, konsole,
and KOrganizer; all in memory, all nice and quick !

If, however, you start to notice your system struggling a bit, then that's a different thing...

Deej

Offline

#5 2009-08-11 21:11:00

AdrenalineJunky
Member
Registered: 2009-05-03
Posts: 149

Re: Arch is raping my memory

same ^^ my system currently has 4.4 gigs of ram devoted to caching.

Offline

#6 2009-08-11 21:19:36

Exitium
Member
From: Helsinki, Finland
Registered: 2008-08-20
Posts: 202

Re: Arch is raping my memory

phrakture wrote:

I have made so many posts like this in these forums, I'm sure you can throw a rock and find one.

Short and sweet: If your memory is not 100% in use, then you wasted your money. Memory is there to be used.

Linux makes aggressive use of caching and buffering, to prevent disk lookups, keep regularly accessed libraries loaded to speed program start time, etc etc

Are you having any performance issues, or are you simply noticing a number? Most people that come from Windows get in the habit of thinking that memory in-use is bad. Stop thinking like that.

Additionally, if you find unaccounted for memory, you may want to look at anything you have mounted as tmpfs or ramfs filesystems. See if those are heavily used (/tmp for instance)

Side note: X using over a gig virtual is a little extreme, though, not sure what it is for other people and other WMs though

Gaming performance decrease neutral

Edit: 95% now.

Last edited by Exitium (2009-08-11 21:21:55)

Offline

#7 2009-08-11 21:39:53

deej
Member
Registered: 2008-02-08
Posts: 395

Re: Arch is raping my memory

Has swap space been used at all [ swapon -s ] ?

Deej

Offline

#8 2009-08-11 21:40:42

Exitium
Member
From: Helsinki, Finland
Registered: 2008-08-20
Posts: 202

Re: Arch is raping my memory

deej wrote:

Has swap space been used at all [ swapon -s ] ?

Deej

I have no swap, I though I had no use for it.

Edit: 98%, eek! Same applications are still running!

Last edited by Exitium (2009-08-11 21:41:32)

Offline

#9 2009-08-11 21:42:20

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: Arch is raping my memory

Exitium wrote:

Gaming performance decrease neutral

Edit: 95% now.

I know this might not be directly related to the topic but I'd like to share it anyway .

Someone in this forum shared once a tip I really liked .

If your machine starts slowing down due to high swap usage(e.g You had a memleak , you killed the offending process but swap is still used) , then you can run this :

#swapoff -a ; swapon -a

I knew those commands but never thought of doing this . Now the alias running those 2 commands is my favorite .

Using this tip and lowering vm.swappiness in "/etc/sysctl.conf" really helps .


English is not my native language .

Offline

#10 2009-08-11 21:44:25

deej
Member
Registered: 2008-02-08
Posts: 395

Re: Arch is raping my memory

Ouch... this'll put the cat among the pigeons roll

Short'n'sweet, you need swap space.

Now comes the *big* discussion... I'll leave here... tongue

Deej

Offline

#11 2009-08-11 21:57:45

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Arch is raping my memory

As others have pointed out, Exitium, 1 GB of your memory is actually used by applications, 2.5 GB is used for caches. 1 GB is a bit on the high side indeed, I'm using less than half that with a similar set of apps (I'm on a 32-bit, 64-bit systems use more memory, but surely the difference shouldn't be as big), but still, you still have 3 GB available. Do you have any evidence whatsoever that it decreases your gaming performance?

It's always a good idea to have a swap partition, even if you have a lot of RAM.

Last edited by lucke (2009-08-11 21:58:33)

Offline

#12 2009-08-11 22:34:56

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: Arch is raping my memory

lucke wrote:

It's always a good idea to have a swap partition, even if you have a lot of RAM.

Or if you've already partitioned and a swap partition is inconvenient, a swapfile.

http://hasnainali.wordpress.com/2009/02 … -in-linux/

That mem usage does seem high, but I use the 32-bit version, so that might be why it seems high to me.

Offline

#13 2009-08-11 22:48:02

Skripka
Member
From: 2X1280X1024
Registered: 2009-02-19
Posts: 555

Re: Arch is raping my memory

theapodan wrote:

Or if you've already partitioned and a swap partition is inconvenient, a swapfile.

http://hasnainali.wordpress.com/2009/02 … -in-linux/

That mem usage does seem high, but I use the 32-bit version, so that might be why it seems high to me.

It isn't even a 32bit vs. 64bit thing.

I run KDE4.3 (Vanilla) on Arch 64, with Amarok/Opera10/Dolphin/Konsole/Plasma/KWin effects/G15 utils running.  My system has been up for 5 hours.  I am only using 1165MB out of 4GB, with caches included in that.

Something else is going on here.

Last edited by Skripka (2009-08-11 22:48:55)

Offline

#14 2009-08-11 22:51:57

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Arch is raping my memory

Shylent wrote:

In essentiality, what swap gives you is protection against burst memory consumption - if some application of yours decides to allocate too much memory for your system's good (memory consumption approaches total available memory), what you are going to get is termination of the said application or (best case) or termination of other applications (not good at all), either way, in 99% cases, the application will not get to do whatever it was going to do. With swap, there is a possibility, that the said application will do whatever it intended to do, release the memory and the normal operation will be resumed. With no swap there is no such possibility.

Nick Piggin wrote:

Hi Buddy,
Even for systems that don't *need* the extra memory space, swap can
actually provide performance improvements by allowing unused memory
to be replaced with often-used memory.

For example, I have 57MB swapped right now. It allows me to instantly
grep the kernel tree. If I turned swap off, each grep would probably
take 30 seconds.

Last edited by Wintervenom (2009-08-11 22:55:28)

Offline

#15 2009-08-12 06:22:46

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Arch is raping my memory

I had the same 'issue' when I started out with Linux. It was on SuSE, and I kept rebooting because my 1 GB RAM would fill up over time...

I had found some nicely looking but badly functioning widget that reported all memory usage (not just effectively used but also cached memory).

But phrakture is spot on. This isn't really an issue that's popping up for the first time, and as such, I'm shutting this thing down smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB