You are not logged in.

#1 2012-11-14 22:22:44

smiffy92
Member
Registered: 2011-04-04
Posts: 11

Installation size and memory taken by base OS

Hi all,

How much disk space and memory should a basic install following the beginners wiki take?

I trashed my old rc.conf installation which used to run sabnzbd, lighttpd and samba mainly which used to take around 40-75Mb of memory

I installed the new systemd Arch and it's taking 120MB RAM  - this is with no software running - just the base install.

I installed the same onto a vm and it takes 80Mb RAM - why would it take less?

And how much disk space does installing the base take - I have an install of over 1GB which seems a lot for a cli based headless server not doing much yet!

htop reports systemd-journald as taking up 1.3% of my memory which is larger than any other process - why is this and can it be lowered?


Thanks

Offline

#2 2012-11-14 23:16:33

nagaseiori
Member
Registered: 2012-09-22
Posts: 71

Re: Installation size and memory taken by base OS

Well, here's how I found the size of the base and base-devel groups in kilobytes (warning: really bad sed):

$ for i in `pacman -Qg base base-devel | sed -e 's/base //g' | sed -e 's/base-devel //g'`; do; pacman -Qi $i | awk '/^Name/ {pkg=$3} /Size/ {print $4$5,pkg}'; done | awk '{print $1}' | sed -e 's/KiB//g' | tr '\n' '+' | sed -e 's/.$/\n/g' | bc 

You could find the packages taking the most space by reading this.

Offline

#3 2012-11-14 23:22:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,423

Re: Installation size and memory taken by base OS

I have no idea what do you mean by 'base install'. On my 32-bit Arch it takes 20 MB RAM right after boot (I mean the buffers/cache line from 'free').
You have to post the output of 'free -m', the list of the software you installed and e.g. some output of ps to see what takes up your RAM.

Last edited by karol (2012-11-14 23:25:29)

Offline

#4 2012-11-14 23:38:02

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Installation size and memory taken by base OS

@nagaseiori, you have an exra semi-colon after a "do".  It should be

for i in `pacman -Qg base base-devel | sed -e 's/base //g' | sed -e 's/base-devel //g'`; do pacman -Qi $i | awk '/^Name/ {pkg=$3} /Size/ {print $4$5,pkg}'; done | awk '{print $1}' | sed -e 's/KiB//g' | tr '\n' '+' | sed -e 's/.$/\n/g' | bc

@OP, this results in 370,945 KiB according to my system.  That is nowhere near a GB (or a GiB for that matter).  How are you coming up with these numbers?

Offline

#5 2012-11-15 01:28:13

smiffy92
Member
Registered: 2011-04-04
Posts: 11

Re: Installation size and memory taken by base OS

By base install I mean the basic OS installation following the beginners guide in the wiki.
I have gone as far as installing X but no gfx drivers or graphical interface - I stopped after installing mesa in the guide.
On top of this I have installed sabnzbd which is not running and have just installed samba which is running(this hasn't made much difference to mem usage, added around 3mb more).


free
             total       used       free     shared    buffers     cached
Mem:        893320     820276      73044          0      28876     670248
-/+ buffers/cache:     121152     772168
Swap:       265068          0     265068

pstree

systemd─┬─agetty
        ├─dbus-daemon
        ├─ifplugd
        ├─nmbd
        ├─smbd───2*[smbd]
        ├─sshd─┬─sshd───sshd───bash
        │      └─sshd───sshd───bash───pstree
        ├─systemd-journal
        ├─systemd-logind
        └─systemd-udevd

df

/dev/sda3        20G  1.4G   17G   8% /

du -skh on root shows most has gone to :-

959M    usr (lib/share)
274M    var (gone to cache/pacman - which is understandable)

Offline

#6 2012-11-15 03:11:21

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Installation size and memory taken by base OS

You may not be running very much, but it really sucks to come here and say, "Why is my sh*t not right when I am running it brand new?" and then a few posts later saying, "Oh yeah, by the way, I installed this, this and this, and I am running them..."

Offline

#7 2012-11-15 05:43:02

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Installation size and memory taken by base OS

systemd taking 1.3% of 120MB is really not much...

> 120*.013 -> MB_of_RAM
> MB_of_RAM
[1] 1.56

Arch Linux is not meant to be a super light distro. It is meant to be a bleeding edge Linux distro for bleeding edge hardware.

You should look into Dam Small Linux. That will run with only 16MB of RAM
http://www.damnsmalllinux.org/

You could also build a system with Linux From Scratch. Then you can do away with BASH and use busybox only, like really build an embedded Linux distro.
http://www.linuxfromscratch.org/

Or start with..
http://elinux.org/Main_Page

If you want to lighten up Arch...
First clear your package cache

rm /var/cache/pacman/pkg/*

To save more disk sapce, you should look into makeing a Squashfs of... well basicaly everything except /home

As for RAM, you need to use ps to find which programs are using the most memory and looking for alternatives.

Last edited by hunterthomson (2012-11-15 05:55:27)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#8 2012-11-15 10:05:55

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Installation size and memory taken by base OS

The size can be adjusted. It takes up very little space (compressed, so I'm thinking Btrfs here).

# pacman -Syw base --cachedir ~/
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: There are 53 members in group base:
:: Repository core
   1) bash  2) bzip2  3) coreutils  4) cronie  5) cryptsetup  6) device-mapper  7) dhcpcd  8) diffutils  9) e2fsprogs  10) file  11) filesystem  12) findutils  13) gawk  14) gcc-libs  15) gettext  16) glibc  17) grep  18) gzip  19) heirloom-mailx  20) inetutils  21) iproute2  22) iputils  23) jfsutils  24) less
   25) licenses  26) linux  27) logrotate  28) lvm2  29) man-db  30) man-pages  31) mdadm  32) nano  33) netcfg  34) nss-myhostname  35) pacman  36) pciutils  37) pcmciautils  38) perl  39) ppp  40) procps-ng  41) psmisc  42) reiserfsprogs  43) sed  44) shadow  45) sysfsutils  46) systemd-sysvcompat  47) tar
   48) texinfo  49) usbutils  50) util-linux  51) vi  52) which  53) xfsprogs

Enter a selection (default=all): 
resolving dependencies...

Targets (53): bash-4.2.039-1  bzip2-1.0.6-4  coreutils-8.20-1  cronie-1.4.8-3  cryptsetup-1.5.1-1  device-mapper-2.02.98-1  dhcpcd-5.6.2-1  diffutils-3.2-1  e2fsprogs-1.42.6-1  file-5.11-1  filesystem-2012.10-2  findutils-4.4.2-4  gawk-4.0.1-1  gcc-libs-4.7.2-2  gettext-0.18.1.1-4  glibc-2.16.0-5  grep-2.14-1
              gzip-1.5-1  heirloom-mailx-12.5-3  inetutils-1.9.1-4  iproute2-3.6.0-2  iputils-20121106-1  jfsutils-1.1.15-3  less-451-1  licenses-2.9-1  linux-3.6.6-1  logrotate-3.8.2-1  lvm2-2.02.98-1  man-db-2.6.3-1  man-pages-3.44-1  mdadm-3.2.6-1  nano-2.2.6-2  netcfg-3.0-1  nss-myhostname-0.3-3  pacman-4.0.3-3
              pciutils-3.1.10-1  pcmciautils-018-4  perl-5.16.2-1  ppp-2.4.5-5  procps-ng-3.3.5-1  psmisc-22.19-1  reiserfsprogs-3.6.21-4  sed-4.2.1-4  shadow-4.1.5.1-1  sysfsutils-2.1.0-8  systemd-sysvcompat-195-2  tar-1.26-2  texinfo-4.13a-7  usbutils-006-1  util-linux-2.22.1-2  vi-1:050325-2  which-2.20-5
              xfsprogs-3.1.8-2

Total Download Size:    85.41 MiB

Proceed with download? [Y/n]

If you want base-devel too... the total would be around 150 MB.

Of course, you can trim it down a few, by leaving out: jfsutils, reiserfsprogs, xfsprogs, lvm2, mdadm, cryptsetup, vi, systemd-sysvcompat, etc.


And about the RAM thing, see: https://wiki.archlinux.org/index.php/FA … _my_RAM.3F

In VirtualBox, an Arch Linux VM is set to use 256 MB RAM by default. If you compare that to the full amount of RAM on the computer (a "bare-bones" install), the size is automatically adjusted. The same thing happens on Windows, too. The amount in MB is adjusted according to the available memory. For example, Firefox is not going to take up the same amount on a machine with 512 MB RAM, compared to one with 4 GB RAM; even with the same settings. It's just how the kernel operates.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-11-15 10:33:39

smiffy92
Member
Registered: 2011-04-04
Posts: 11

Re: Installation size and memory taken by base OS

Ah ok thanks - that link about the RAM explains it a bit better - is this how it's always been? - my previous pre-systemd install had a lot more running but took around half the RAM.

I left my VM running for the past day and with 512MB RAM it is using 34MB so it appears it lowers overs time.

@WonderWoofy - I am not complaining about anything , I am more curious than anything else and was wanting to fix any underlying issue if it exists before layering on the other parts of my system. I am comparing with my previous set-up which was perfect for me in terms of resources used and speed.

I know Arch isn't a super light distro but one of it's goals is/was to be minimalist - I guess this means something else nowadays as capacities increase all round.

Offline

#10 2012-11-15 10:37:18

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Installation size and memory taken by base OS

120MB seems like a lot to me (the live CD takes 54MB after booting). Can you give more details? top shows you which program uses how much, and /proc/meminfo gives more information.

Offline

#11 2012-11-15 13:42:02

tuxtard
Member
Registered: 2012-10-11
Posts: 30

Re: Installation size and memory taken by base OS

/tmp is now stored in RAM, so you might want to disable this to release more RAM space.

Offline

#12 2012-11-17 13:22:52

NlightNFotis
Member
From: Greece
Registered: 2012-09-30
Posts: 20
Website

Re: Installation size and memory taken by base OS

DSpider wrote:

In VirtualBox, an Arch Linux VM is set to use 256 MB RAM by default. If you compare that to the full amount of RAM on the computer (a "bare-bones" install), the size is automatically adjusted. The same thing happens on Windows, too. The amount in MB is adjusted according to the available memory. For example, Firefox is not going to take up the same amount on a machine with 512 MB RAM, compared to one with 4 GB RAM; even with the same settings. It's just how the kernel operates.

Interesting. I always thought this happened, but was only estimating on that. Thanks for the info smile


Google+ | Github

Hacking: Those who can...do. Those who can't...complain.

Offline

#13 2012-11-17 14:10:00

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,388
Website

Re: Installation size and memory taken by base OS

Only partially relevant, but that long multi-sed line can be replaced with the following:

pacman -Si $(pacman -Sgq base base-devel) | awk '/Installed Size/ {sum+=$4;} END {print sum/1024 " MiB"}'

Edit: aren't code tags supposed to prevent line wrapping (it isn't here)?  Is this new in the fluxBB software?

Last edited by Trilby (2012-11-17 14:13:10)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#14 2012-11-18 02:10:45

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Installation size and memory taken by base OS

Trilby wrote:

Edit: aren't code tags supposed to prevent line wrapping (it isn't here)?  Is this new in the fluxBB software?

They do here.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB