LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-27-2012, 11:50 AM   #1
r0sko
LQ Newbie
 
Registered: Jul 2012
Location: Bulgaria
Distribution: Debian
Posts: 10

Rep: Reputation: Disabled
Debian eats up all RAM + Samba problem


Hi!
I`m new to this forum and this is my 1st post, so sorry if I`m posting in wrong section!

I have successfully installed Debian Squeeze 6.05 on 600 Mhz Pentium III with 512 MB SDRAM and turned on SWAP - about 512 megs.
General purpose of this machine will be NAS(torrent client-rTorrent and Samba as share daemon). But.. here comes the problem - the operating system eats up all RAM memory, the free is about 6-7 megs

Code:
root@seedbox:~# free
             total       used       free     shared    buffers     cached
Mem:        513544     506696       6848          0       2532     482656
-/+ buffers/cache:      21508     492036
Swap:       499988       9440     490548
The output of ps aux, from which I can see that noone of my running processes eath that much RAM.
Code:
root@seedbox:~# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2032   320 ?        Ss   15:45   0:01 init [2]
root         2  0.0  0.0      0     0 ?        S    15:45   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    15:45   0:00 [migration/0]
root         4  0.1  0.0      0     0 ?        S    15:45   0:19 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    15:45   0:00 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S    15:45   0:00 [events/0]
root         7  0.0  0.0      0     0 ?        S    15:45   0:00 [cpuset]
root         8  0.0  0.0      0     0 ?        S    15:45   0:00 [khelper]
root         9  0.0  0.0      0     0 ?        S    15:45   0:00 [netns]
root        10  0.0  0.0      0     0 ?        S    15:45   0:00 [async/mgr]
root        11  0.0  0.0      0     0 ?        S    15:45   0:00 [pm]
root        12  0.0  0.0      0     0 ?        S    15:45   0:00 [sync_supers]
root        13  0.0  0.0      0     0 ?        S    15:45   0:00 [bdi-default]
root        14  0.0  0.0      0     0 ?        S    15:45   0:00 [kintegrityd/0]
root        15  0.0  0.0      0     0 ?        S    15:45   0:00 [kblockd/0]
root        16  0.0  0.0      0     0 ?        S    15:45   0:00 [kacpid]
root        17  0.0  0.0      0     0 ?        S    15:45   0:00 [kacpi_notify]
root        18  0.0  0.0      0     0 ?        S    15:45   0:00 [kacpi_hotplug]
root        19  0.0  0.0      0     0 ?        S    15:45   0:00 [kseriod]
root        21  0.0  0.0      0     0 ?        S    15:45   0:00 [kondemand/0]
root        22  0.0  0.0      0     0 ?        S    15:45   0:00 [khungtaskd]
root        23  0.0  0.0      0     0 ?        S    15:45   0:07 [kswapd0]
root        24  0.0  0.0      0     0 ?        SN   15:45   0:00 [ksmd]
root        25  0.0  0.0      0     0 ?        S    15:45   0:00 [aio/0]
root        26  0.0  0.0      0     0 ?        S    15:45   0:00 [crypto/0]
root       139  0.0  0.0      0     0 ?        S    15:45   0:00 [ksuspend_usbd]
root       140  0.0  0.0      0     0 ?        S    15:45   0:00 [khubd]
root       141  0.0  0.0      0     0 ?        S    15:45   0:00 [ata/0]
root       142  0.0  0.0      0     0 ?        S    15:45   0:00 [ata_aux]
root       144  0.0  0.0      0     0 ?        S    15:45   0:00 [scsi_eh_0]
root       145  0.0  0.0      0     0 ?        S    15:45   0:00 [scsi_eh_1]
root       155  0.0  0.0      0     0 ?        S    15:45   0:00 [scsi_eh_2]
root       156  0.8  0.0      0     0 ?        D    15:45   1:41 [usb-storage]
root       187  0.0  0.0      0     0 ?        S    15:45   0:00 [kjournald]
root       243  0.0  0.0   2260   256 ?        S<s  15:45   0:00 udevd --daemon
root       344  0.0  0.0   2256   144 ?        S<   15:45   0:00 udevd --daemon
root       345  0.0  0.0   2256   204 ?        S<   15:45   0:00 udevd --daemon
root       573  0.0  0.0      0     0 ?        S    15:45   0:00 [kjournald]
daemon     646  0.0  0.0   1808   232 ?        Ss   15:45   0:00 /sbin/portmap
statd      658  0.0  0.0   1940   308 ?        Ss   15:45   0:00 /sbin/rpc.statd
root       799  0.0  0.1  28576   580 ?        Sl   15:45   0:00 /usr/sbin/rsyslogd -c4
root       828  0.0  0.0   1700   268 ?        Ss   15:45   0:00 /usr/sbin/acpid
daemon     853  0.0  0.0   2160   188 ?        Ss   15:45   0:00 /usr/sbin/atd
root       884  0.0  0.0   3816   376 ?        Ss   15:45   0:00 /usr/sbin/cron
101       1153  0.0  0.0   6516   372 ?        Ss   15:45   0:00 /usr/sbin/exim4 -bd -q30m
root      1178  0.0  0.0   5496   416 ?        Ss   15:45   0:00 /usr/sbin/sshd
root      1201  0.0  0.0   1708   248 tty1     Ss+  15:45   0:00 /sbin/getty 38400 tty1
root      1202  0.0  0.0   1708   248 tty2     Ss+  15:45   0:00 /sbin/getty 38400 tty2
root      1203  0.0  0.0   1708   248 tty3     Ss+  15:45   0:00 /sbin/getty 38400 tty3
root      1204  0.0  0.0   1708   248 tty4     Ss+  15:45   0:00 /sbin/getty 38400 tty4
root      1205  0.0  0.0   1708   248 tty5     Ss+  15:45   0:00 /sbin/getty 38400 tty5
root      1206  0.0  0.0   1708   248 tty6     Ss+  15:45   0:00 /sbin/getty 38400 tty6
root      1207  0.0  0.2   8400  1052 ?        Ss   15:45   0:04 sshd: root@pts/0
root      1209  0.0  0.2   5808  1312 pts/0    Ss   15:45   0:01 -bash
root      1227  0.4  0.2   8396  1084 ?        Ss   15:50   0:54 sshd: root@notty
root      1230  1.7  0.1   2056   568 ?        Ss   15:51   3:24 /usr/lib/openssh/sftp-server
root      1236  0.0  0.2   8396  1152 ?        Ss   15:57   0:01 sshd: root@notty
root      1239  0.0  0.0   1932   408 ?        Ss   15:57   0:00 /usr/lib/openssh/sftp-server
root      1380  0.0  0.1   8392   808 ?        Ss   16:16   0:00 sshd: root
root      1394  0.0  0.0      0     0 ?        S    16:18   0:00 [kjournald]
root      1405  0.0  0.1   4580   696 ?        Ss   16:19   0:01 SCREEN -d -m -S rtorrent rtorrent
root      1406  4.0  1.6 170712  8456 pts/1    Ssl+ 16:19   6:32 rtorrent
root      1409  0.2  0.2   8392  1048 ?        Ss   16:19   0:24 sshd: root
104       1815  0.0  0.0   2580   256 ?        Ss   17:42   0:00 /usr/bin/dbus-daemon --system
root      2363  0.0  0.2  10520  1096 ?        Ss   18:27   0:00 /usr/sbin/nmbd -D
root      2367  0.0  0.2  17816  1248 ?        Ss   18:27   0:00 /usr/sbin/smbd -D
root      2373  0.0  0.1  17816   912 ?        S    18:27   0:00 /usr/sbin/smbd -D
root      2374  0.0  0.4  17924  2388 ?        S    18:27   0:01 /usr/sbin/smbd -D
root      2489  0.0  0.0      0     0 ?        S    18:50   0:00 [flush-8:16]
root      2490  0.0  0.0      0     0 ?        S    18:51   0:00 [flush-8:0]
root      2494  0.0  0.2   3872  1044 pts/0    R+   19:01   0:00 ps aux
The samba problem - Samba is very slow from Windows(i don't know if this is same from linux computer).

Here is the smb.conf
Code:
root@seedbox:~# cat /etc/samba/smb.conf
[global]

workgroup = WORKGROUP
netbios name = SEEDBOX
server string = %h server (Samba %v)
#
socket options = TCP_NODELAY
unix charset = ISO-8859-1
local master = yes
preferred master = yes
security = share
#
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0

[TORRENTS]

path=/mnt/sda3/TORRENTS
browseable=yes
writeable=yes
valid users = rosko
admin users = root

[ROOT]

path=/mnt/sda3/
browseable=yes
writeable=yes
valid users = rosko
admin users = root
I don't know, maybe it is because of low memory.

P.S.-Sorry for the long post, but....
 
Old 07-27-2012, 12:10 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
You actually have plenty of free memory.

Do the following:

Code:
cat /proc/meminfo
Post the results and we can go over what is actually happening with your memory and how the Linux kernel manages memory.
 
1 members found this post helpful.
Old 07-27-2012, 12:23 PM   #3
r0sko
LQ Newbie
 
Registered: Jul 2012
Location: Bulgaria
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: Disabled
Here it is:

Code:
MemTotal:         513544 kB
MemFree:           12268 kB
Buffers:            5644 kB
Cached:           478428 kB
SwapCached:          976 kB
Active:           241504 kB
Inactive:         249064 kB
Active(anon):        800 kB
Inactive(anon):     5712 kB
Active(file):     240704 kB
Inactive(file):   243352 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:             0 kB
HighFree:              0 kB
LowTotal:         513544 kB
LowFree:           12268 kB
SwapTotal:        499988 kB
SwapFree:         496356 kB
Dirty:                16 kB
Writeback:             0 kB
AnonPages:          5684 kB
Mapped:             4248 kB
Shmem:                16 kB
Slab:               6676 kB
SReclaimable:       3772 kB
SUnreclaim:         2904 kB
KernelStack:         544 kB
PageTables:          500 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      756760 kB
Committed_AS:      53136 kB
VmallocTotal:     504952 kB
VmallocUsed:        6256 kB
VmallocChunk:     490592 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       4096 kB
DirectMap4k:       15232 kB
DirectMap4M:      507904 kB
Thanks for fast reply!
 
Old 07-27-2012, 12:28 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Have a look here, this will explain the output of the free command: http://www.linuxatemyram.com/
 
Old 07-27-2012, 12:34 PM   #5
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by TobiSGD View Post
Have a look here, this will explain the output of the free command: http://www.linuxatemyram.com/
I hate that site, explanations are not good enough IMO.


Here is what you want to pay attention to:


Code:
Cached:           478428 kB
SwapCached:          976 kB
Active:           241504 kB
Inactive:         249064 kB
Active(anon):        800 kB
Inactive(anon):     5712 kB
Active(file):     240704 kB
Inactive(file):   243352 kB
When an application uses memory and then releases it, the linux kernel does not automatically "clean" this memory and return it to the free pool as you normally see in a Windows OS. Instead, it leaves this memory in a dirty or inactive state. It will then clean any memory that it needs to from this pool if there is not enough free clean memory that an application is requesting. So you see almost 2.5 GB of incative memory, this will not display as "free" memory using vmstat or free -m utilities but it is actually available to applications that would request it.

Hopefully this helps clear some things up. Let us know if you have any questions.
 
Old 07-27-2012, 12:42 PM   #6
r0sko
LQ Newbie
 
Registered: Jul 2012
Location: Bulgaria
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: Disabled
Yes, I have - the 2nd question for samba? Definitely the problem for samba is not the amount of free RAM, what is it then?

Edit: I think I realized why Samba hangs on - my big(SATA) HDD is attached through USB to SATA adapter, but the old Compaq USB 1.1(12 Mbps) makes everything..

Code:
root@seedbox:~# cat /sys/bus/usb/devices/usb1/speed
12
Tomorrow will add USB 2.0 controller and hope Debian have the right driver for it.

Last edited by r0sko; 07-27-2012 at 02:09 PM.
 
Old 07-28-2012, 11:23 AM   #7
r0sko
LQ Newbie
 
Registered: Jul 2012
Location: Bulgaria
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: Disabled
Angry

Bad news here, my 2nd PCI slot wont work. For now, the topic can be closed, because I think Samba hangs because of 12 Mbps rate of the USB 1.1 controller

THANKS to all who tryed to help!
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FLASH eats so much RAM?anyway out nooralain Linux - General 8 05-02-2012 10:53 AM
Something eats up my whole RAM causing kernel panic! ethanole Linux - Newbie 9 09-19-2011 07:48 PM
VirtualBox eats my RAM exquest Linux - Software 5 10-25-2010 02:13 AM
IPP process eats too much RAM bruno321 Linux - Newbie 2 09-21-2007 09:43 PM
Mdk LE 2005 Eats ram? Damnation Linux - General 9 07-16-2005 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration