LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices

Reply
 
Search this Thread
Old 02-10-2014, 07:56 AM   #1
haziz
Member
 
Registered: Jan 2012
Location: /dev/null
Distribution: Slackware, Fedora, Debian, Centos, Ubuntu
Posts: 60

Rep: Reputation: 1
Slackware on the Raspberry Pi is a Memory Hog?!?


I installed Slackware 14.1 on my Raspberry Pi (512 meg RAM) using these instructions. To my surprise the memory footprint of it booting into the CLI is approximately 360 megs (determined using "free"). Even my x86 install on my laptop uses less memory (also a 32 bit 14.1 install). Raspbian and Arch on the same Pi use < 100 megs for a CLI boot. I think of Slackware as a lean, mean computing machine, which is why this surprised me.

So why is it this much of a memory hog? Inefficient distribution of RAM to the Framebuffer/GPU? Daemons starting at boot? If that is the case why is my x86 utilizing less memory?

On a side note, is the kernel for Slackware compiled for a hard or soft float?

I love Slackware immensely and will continue to use it on the Raspberry Pi, I am just curious.
 
Old 02-10-2014, 09:44 AM   #2
enine
Member
 
Registered: Nov 2003
Distribution: Slackware 14.1
Posts: 723

Rep: Reputation: 77
Check some of the answers on my post http://www.linuxquestions.org/questi...pi-4175492466/

Seems it will run on the PI but is not optimized for it. I tried a minimal install and had all kinds of problems until I started over with a full install. I got mine running fine but started stressing it and eventually it went in the weeds for a few hours and I killed power when I got home and that corrupted the drive so I need to install again.
 
Old 02-10-2014, 10:18 AM   #3
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 593

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by haziz View Post
I installed Slackware 14.1 on my Raspberry Pi (512 meg RAM) using these instructions. To my surprise the memory footprint of it booting into the CLI is approximately 360 megs (determined using "free"). Even my x86 install on my laptop uses less memory (also a 32 bit 14.1 install). Raspbian and Arch on the same Pi use < 100 megs for a CLI boot. I think of Slackware as a lean, mean computing machine, which is why this surprised me.

So why is it this much of a memory hog? Inefficient distribution of RAM to the Framebuffer/GPU? Daemons starting at boot? If that is the case why is my x86 utilizing less memory?

On a side note, is the kernel for Slackware compiled for a hard or soft float?

I love Slackware immensely and will continue to use it on the Raspberry Pi, I am just curious.
Something is wrong with your setup...

Because I use SlackwareARM 14.1 (also) in a 10" WonderMedia 8650 (ARMv5TE) netbook, sporting just 256MB RAM. Still, my setup having a full install (excluding KDE, KDEI) and it run nice and responsive under X.org, using XFCE4 as DE.

So, I can't claim that Slackware-ARM is a Memory Hog.

Last edited by Darth Vader; 02-10-2014 at 10:20 AM.
 
Old 02-10-2014, 10:22 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,412
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Have you checked with top or htop which process is using that much memory? Also, what exactly does free report?
 
Old 02-10-2014, 12:58 PM   #5
haziz
Member
 
Registered: Jan 2012
Location: /dev/null
Distribution: Slackware, Fedora, Debian, Centos, Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by TobiSGD View Post
Have you checked with top or htop which process is using that much memory? Also, what exactly does free report?
Not yet but I will. The RAM is shared between the GPU and CPU. I wonder if a good chunk is being reserved for the GPU. There are ways to adjust that with the other distros. I am mostly using Slack from the command line and don't need fancy graphics.
 
Old 02-10-2014, 01:11 PM   #6
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 139

Rep: Reputation: 9
Right after boot my Pi has 120Mb used most of which is cache and buffers ... the real usage is less then 20Mb. If I then start X with fluxbox window manager real usage rises to 25Mb.
Unfortunately I'm editing from my AC100 and cut and paste does not work from xterm ... otherwise I'd post the output of free to show the mem usage of my Pi.

I'm just guessing: you have enabled tmpfs in fstab that by default will use 50% of the available ram.
 
Old 02-11-2014, 08:21 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,412
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by louigi600 View Post
I'm just guessing: you have enabled tmpfs in fstab that by default will use 50% of the available ram.
No, it will not. The 50% default is the limit how much it can use. tmpfs will only use as much RAM as it needs to store the data, if you only have a 1MB file on a tmpfs it will only use 1MB.
 
Old 02-11-2014, 11:25 AM   #8
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 139

Rep: Reputation: 9
That's true but depending on what you do with the tmpfs it can happen that it gets used to something close to the default maximum allowed.
I've seen that happen on my printserver running on a seagate dockstar from readoly filesystem where all the stuff that needs to be written ends up in tmpfs. But it was just a guess with out having the output of free or /proc/meminfo ... ina nay case there is something odd with that system: my Pi is not on right now but I've handy my hedless salvaged tablet with a very similar setup to my Pi (practically the same packages installed and same amount of ram) and here is what it has to say about memory usage

Code:
root@headless:~# free
             total       used       free     shared    buffers     cached
Mem:        496156     244948     251208          0      14068     211048
-/+ buffers/cache:      19832     476324
Swap:            0          0          0
root@headless:~#
and if I start X

Code:
root@headless:~# ps -ef | grep -E "X|fluxbox"
root       816   800  0 17:30 pts/1    00:00:00 xinit /usr/lib/X11/xinit/xinitrc -- /usr/bin/X :0 -auth /root/.serverauth.800
root       817   816  0 17:30 tty7     00:00:00 /usr/bin/X :0 -auth /root/.serverauth.800
root       822   816  0 17:30 pts/1    00:00:00 fluxbox
root       837   594  0 17:31 pts/1    00:00:00 grep -E X|fluxbox
root@headless:~# free
             total       used       free     shared    buffers     cached
Mem:        496156     258380     237776          0      14760     217832
-/+ buffers/cache:      25788     470368
Swap:            0          0          0
root@headless:~#
Memory usage is so low I've not even considered configuring swap.
 
Old 02-11-2014, 04:51 PM   #9
haziz
Member
 
Registered: Jan 2012
Location: /dev/null
Distribution: Slackware, Fedora, Debian, Centos, Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by TobiSGD View Post
Have you checked with top or htop which process is using that much memory? Also, what exactly does free report?
I finally did. Interestingly this time is is using only 200 megs (I did see 360 megs last time just after booting into the CLI):

Output from free this time:

Code:
haziz@slack:~$ free
             total       used       free     shared    buffers     cached
Mem:        496828     202092     294736          0      34192     143168
-/+ buffers/cache:      24732     472096
Swap:       999996          0     999996
Output from top:

Code:
Tasks:  62 total,   1 running,  61 sleeping,   0 stopped,   0 zombie
Cpu(s): 11.7%us,  4.5%sy,  0.0%ni, 82.4%id,  1.0%wa,  0.2%hi,  0.1%si,  0.0%st
Mem:    496828k total,   205348k used,   291480k free,    35236k buffers
Swap:   999996k total,        0k used,   999996k free,   144592k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                                                         
  621 haziz     20   0  2840 1064  836 R  5.7  0.2   0:00.06 top                                                                                                                                                                             
    1 root      20   0  1824  636  568 S  0.0  0.1   0:00.91 init                                                                                                                                                                            
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                                                                                                                                                                        
    3 root      20   0     0    0    0 S  0.0  0.0   0:00.12 ksoftirqd/0                                                                                                                                                                     
    5 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kworker/0:0H                                                                                                                                                                    
    6 root      20   0     0    0    0 S  0.0  0.0   0:00.12 kworker/u2:0                                                                                                                                                                    
    7 root      20   0     0    0    0 S  0.0  0.0   0:00.33 rcu_preempt                                                                                                                                                                     
    8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rcu_bh                                                                                                                                                                          
    9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rcu_sched                                                                                                                                                                       
   10 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 khelper                                                                                                                                                                         
   11 root      20   0     0    0    0 S  0.0  0.0   0:00.01 kdevtmpfs                                                                                                                                                                       
   12 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 netns                                                                                                                                                                           
   13 root      20   0     0    0    0 S  0.0  0.0   0:00.20 kworker/0:1                                                                                                                                                                     
   14 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 writeback                                                                                                                                                                       
   15 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 bioset                                                                                                                                                                          
   16 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kblockd                                                                                                                                                                         
   17 root      20   0     0    0    0 S  0.0  0.0   0:00.29 khubd                                                                                                                                                                           
   18 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 rpciod                                                                                                                                                                          
   19 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khungtaskd                                                                                                                                                                      
   20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0
 
Old 02-11-2014, 05:06 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,412
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
There seems to be confusion about what free reports. The memory actually used by the system for applications can be found in the second row, in your case about 24MB. Have a look here: http://www.linuxatemyram.com/
 
1 members found this post helpful.
Old 02-11-2014, 06:49 PM   #11
haziz
Member
 
Registered: Jan 2012
Location: /dev/null
Distribution: Slackware, Fedora, Debian, Centos, Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by TobiSGD View Post
There seems to be confusion about what free reports. The memory actually used by the system for applications can be found in the second row, in your case about 24MB. Have a look here: http://www.linuxatemyram.com/
Thanks. That makes for interesting reading. Interestingly the man page for free does not make that explicit.

Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox - SUCH a memory hog !! wearetheborg Linux - Software 6 06-04-2006 03:56 PM
Linux being a hog for memory. Kefka_DArden Linux - Newbie 6 04-19-2004 04:25 PM
Linux memory hog? ryedunn Linux - Hardware 2 03-28-2004 11:45 AM
Memory Hog? AekaGSR Linux - Newbie 2 07-04-2003 10:55 AM
memory hog jct842 Linux - Newbie 2 02-28-2002 12:20 AM


All times are GMT -5. The time now is 03:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration