You are not logged in.
Hi Everyone,
I Don't know if this is the place to post this, and if not please correct me.
I've installed Arch Linux in a virtual machine HDD using VirtualBox on Linux Mint. Then I made a simple install with openbox and slim just to make some testes before putting the all thing in my laptop.
So after installing slim and openbox, i've checked free -m and he noticed me that the system was using 80mb of ram (really cool ^^). Then I start installing some apps just for test.
I start installing libreoffice like this "sudo pacman -S libreoffice", in a xterm terminal and on another xterm terminal I had the fallowing command running "watch free -m" just to see the ram usage evolution...
And then, during downloading/instalations, things became wierd... during download the ram usage start to grow up to 120mb and during instalation the ram usage start's growing more and more, to finish at 770mb !
I doesn't make any sense ! But I don't really know if this is a pacman, openbox or xterm problem :S...
Can someone give me any information about that ?
Thanks in advance !
PS : after a "sudo pacman -Scc" the ram drop at 633mb...
Luis Da Costa
Last edited by aliasbody (2011-07-07 18:33:56)
Offline
Please post the output of 'free -m'.
Offline
I've restarted the machine :S... I'm trying to reproduce the error again, but he doesn't go up more than 319 for the Memory Used and 56 for the Buffers used :S.. strange
Offline
Done....
Memory :
Total - 1913
Used - 679
Free - 1233
Shared - 0
Buffers - 29
-/+ buffers/cache :
total - 75
free - 1838
swap :
total - 258
used - 0
free - 258
Offline
Are you looking at the first or the second line of the free command's output? The second one shows actual amount of memory used by applications.
Offline
I know the second one shows the actual amount of memory used by applications and the first one is the allocated if I remenber, but my problem is that the first line of memory usage never grow up that fast... in this machine I have 2gb of ram just for the virtual machine, but in my netbook with 1Gb this can start using swap fast when he's really only using 60mb of ram :S...
Offline
I don't know why would it use swap, but if you have n GBs of RAM, why not use it all? Unused RAM is wasted RAM.
Last edited by karol (2011-07-06 17:34:59)
Offline
Yes but it is not normal at all, because it starts using ram. I got the proof here on my girlfriend's netbook, before makin an "sudo pacman -S package" I got 600mb of used ram and 400 of buffers now I got this :
total used free shared buffers cached
Mem: 996 833 163 0 46 323
-/+ buffers/cache: 463 533
Swap: 2930 3 2926
And obviously, the pc was starting to became slow because he start's using swap actively during the instalation... I know it is only 3 megabits but this can grow up more if I do more than 1 install/update :S....
Offline
It happens to me too sometimes: I have little RAM and when doing multiple RAM-heavy things at once I can end up with a few MB of swap used.
I use this:
swaponoff=`sudo swapoff -a && sleep 2 && sudo swapon -a'to get rid of the swap annoyance.
Offline
I'm sorry, I'm not making myself clear - my problem isn't the usage of Swap itself. I know that when RAM reaches its maximum, it uses Swap. I know that. And that's not what I'm "complaining" about.
Problem is - why does updating via pacman uses so much allocated RAM? I think there's a memory leak in here somewhere and that's what I was aiming at - I'm basically asking if it's just me or if this has happened to someone else and if it's really a problem or it has a simple explanation....
Offline
You said that you've installed Arch in a VM, are those things happening on a bare metal install too?
The installation on your girlfriend's netbook - is it in a VM?
Offline
The first instalation was a Virtual Machine, but the second one, my Girldfriend's netbook, it is a atom 1.6Ghz netbook, so no VM.
Offline
Install dstat and run something like "dstat -dnmgs --top-bio" to observe what is happening.
Put vm.swappiness=0 in /etc/sysctl.conf if you don't like swapping. Swapping isn't necessarily evil - I prefer to have unused pages in swap.
Offline
I'm sorry, I'm not making myself clear - my problem isn't the usage of Swap itself. I know that when RAM reaches its maximum, it uses Swap. I know that. And that's not what I'm "complaining" about.
Problem is - why does updating via pacman uses so much allocated RAM? I think there's a memory leak in here somewhere and that's what I was aiming at - I'm basically asking if it's just me or if this has happened to someone else and if it's really a problem or it has a simple explanation....
Well, pacman's memory usage depends on a particular package in question. Installing TexLive, for instance, takes a tremendous amount of RAM/swap compared to netcfg. Pacman does not simply copy files, but also executes scripts.
It is not true that swap is used when the RAM is full. The kernel decides which data in RAM is relevant and the irrelevant data goes to swap, even if you have 300mb of RAM still available. /proc/sys/vm/swappiness controls this logic.
In your atom netbook you have only 3mb in swap... this can not be the cause of a slowdown.
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
aliasbody wrote:I'm sorry, I'm not making myself clear - my problem isn't the usage of Swap itself. I know that when RAM reaches its maximum, it uses Swap. I know that. And that's not what I'm "complaining" about.
Problem is - why does updating via pacman uses so much allocated RAM? I think there's a memory leak in here somewhere and that's what I was aiming at - I'm basically asking if it's just me or if this has happened to someone else and if it's really a problem or it has a simple explanation....
Well, pacman's memory usage depends on a particular package in question. Installing TexLive, for instance, takes a tremendous amount of RAM/swap compared to netcfg. Pacman does not simply copy files, but also executes scripts.
It is not true that swap is used when the RAM is full. The kernel decides which data in RAM is relevant and the irrelevant data goes to swap, even if you have 300mb of RAM still available. /proc/sys/vm/swappiness controls this logic.
In your atom netbook you have only 3mb in swap... this can not be the cause of a slowdown.
Thank you for your answer this make me understand more about the all thing ^^
I was just scared about a possibile memory leak, I didn't know that pacman.
Thanks in advance for all, I will marked it as Solved then !
Offline