You are not logged in.

#1 2010-01-28 04:13:30

yuvaraj
Member
Registered: 2009-03-31
Posts: 3

Is pacman using excessive amount of RAM? Does it need optimization?

[root@li83-30 ~]# uname -a                                                                         
Linux li83-30 2.6.32-x86_64-linode11 #1 SMP Sat Dec 5 16:55:26 UTC 2009 x86_64 Intel(R) Xeon(R) CPU
L5520 @ 2.27GHz GenuineIntel GNU/Linux                                                             
[root@li83-30 ~]# free -m                                                                           
             total       used       free     shared    buffers     cached                           
Mem:           343         90        252          0          8         48                           
-/+ buffers/cache:         33        309                                                           
Swap:          511          0        511                                                           
[root@li83-30 ~]# pacman -Syy                                                                       
:: Synchronizing package databases...                                                               
core                      36.1K  249.7K/s 00:00:00                                                 
extra                    441.8K   64.6K/s 00:00:07                                                 
community                370.8K   66.7K/s 00:00:06                                                 
[root@li83-30 ~]# free -m                                                                           
             total       used       free     shared    buffers     cached                           
Mem:           343        180        162          0         46         82                           
-/+ buffers/cache:         51        292                                                           
Swap:          511          0        511                                                           
[root@li83-30 ~]#

Offline

#2 2010-01-28 04:18:49

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: Is pacman using excessive amount of RAM? Does it need optimization?

No, it's because 64bit applications utilize more ram than the 32bit ones.

Offline

#3 2010-01-28 05:09:55

yuvaraj
Member
Registered: 2009-03-31
Posts: 3

Re: Is pacman using excessive amount of RAM? Does it need optimization?

I loaded my linode vps with 64-bit Debian 5.0 and tried comparing memory usage of apt-get with pacman. 'apt-get update' used around 50 MB RAM while 'pacman -Syy' used around 90 MB RAM.

li83-30:~# uname -a                                                                                 
Linux li83-30 2.6.18.8-x86_64-linode10 #1 SMP Tue Nov 10 16:29:17 UTC 2009 x86_64 GNU/Linux         
li83-30:~# free -m                                                                                 
             total       used       free     shared    buffers     cached                           
Mem:           360         39        321          0          1         10                           
-/+ buffers/cache:         27        333                                                           
Swap:          511          0        511                                                           
li83-30:~# apt-get update                                                                           
Get:1 http://security.debian.org stable/updates Release.gpg [835B]                                 
Get:2 http://security.debian.org stable/updates Release [40.8kB]                                   
Get:3 http://security.debian.org stable/updates/main Packages [338kB]                               
Get:4 http://security.debian.org stable/updates/contrib Packages [20B]                             
Get:5 http://mirror.cc.columbia.edu lenny Release.gpg [1032B]                                       
Get:6 http://mirror.cc.columbia.edu lenny Release [73.6kB]                                         
Ign http://mirror.cc.columbia.edu lenny/main Packages/DiffIndex                                     
Get:7 http://mirror.cc.columbia.edu lenny/contrib Packages [86.8kB]                                 
Get:8 http://mirror.cc.columbia.edu lenny/main Packages [6848kB]                                   
Fetched 7389kB in 10s (738kB/s)                                                                     
Reading package lists... Done                                                                       
li83-30:~# free -m                                                                                 
             total       used       free     shared    buffers     cached                           
Mem:           360         87        272          0          1         57                           
-/+ buffers/cache:         28        331                                                           
Swap:          511          0        511                                                           
li83-30:~#

Offline

#4 2010-01-28 05:13:17

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,650
Website

Re: Is pacman using excessive amount of RAM? Does it need optimization?

Using free before and after a program ran is an incredibly naive way of measuring memory usage...  so much, that the numbers you posted are quite meaningless.

Offline

#5 2010-01-28 06:44:14

yuvaraj
Member
Registered: 2009-03-31
Posts: 3

Re: Is pacman using excessive amount of RAM? Does it need optimization?

I apologize for my ignorance. I am trying to get a very rough picture here. Can you explain why -/+ buffers/cache: shows a big difference before and after running "pacman -Syy".
Why does "apt-get update" does not show that kind of difference in -/+ buffers/cache: before and after running it?
I thought -/+ buffers/cache: is supposed to show the amount of really used RAM after subtracting the sizes of buffers and caches from the total memory used.

Offline

#6 2010-01-28 09:53:06

jwwolf
Member
Registered: 2009-06-29
Posts: 74

Re: Is pacman using excessive amount of RAM? Does it need optimization?

Why does it matter?
You buy RAM to use it.

Offline

#7 2010-01-28 09:54:47

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Is pacman using excessive amount of RAM? Does it need optimization?

I think a reason might be, that "apt-get update" is more comparable with "pacman -Sy", rather than "pacman -Syy"

Offline

#8 2010-01-28 13:22:51

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Is pacman using excessive amount of RAM? Does it need optimization?

I am not familiar with internals, but it may be a time/memory trade off somewhere in pacman, so that it executes faster.

Offline

#9 2010-01-28 13:42:15

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Is pacman using excessive amount of RAM? Does it need optimization?

yuvaraj wrote:

I apologize for my ignorance. I am trying to get a very rough picture here. Can you explain why -/+ buffers/cache: shows a big difference before and after running "pacman -Syy".
Why does "apt-get update" does not show that kind of difference in -/+ buffers/cache: before and after running it?
I thought -/+ buffers/cache: is supposed to show the amount of really used RAM after subtracting the sizes of buffers and caches from the total memory used.

Start htop before you run pacman, and look at the ram usage of all the processes running. Run pacman and see what changes.

Last edited by Mr.Elendig (2010-01-28 13:42:38)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2010-01-28 13:45:24

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,650
Website

Re: Is pacman using excessive amount of RAM? Does it need optimization?

yuvaraj wrote:

I apologize for my ignorance. I am trying to get a very rough picture here. Can you explain why -/+ buffers/cache: shows a big difference before and after running "pacman -Syy".
Why does "apt-get update" does not show that kind of difference in -/+ buffers/cache: before and after running it?
I thought -/+ buffers/cache: is supposed to show the amount of really used RAM after subtracting the sizes of buffers and caches from the total memory used.

After running a process, all the memory it uses is freed. I.e. not in the "used" column...  Some stuff might sit around in the cache to speed up the next run but that is freed when needed too.

But still, the cache usage tells up absolutely nothing.  For the same cache usage, a program might have read a big chunk of data or it might have read and free lots of small chunks of data.  One will use substantially more memory than the other.  So, cache usage is meaningless.

A google search will show you how to actually measure the maximum memory usage of a program.

Offline

#11 2010-01-28 14:10:44

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Is pacman using excessive amount of RAM? Does it need optimization?

IIRC, Dan (toofishes) has done a few pacman revisions over the years to seriously whittle down its memory usage, which by now should be quite relatively low I would say.

Offline

Board footer

Powered by FluxBB