View Full Version : [SOLVED] Samba eats server memory

January 10th, 2011, 04:23 PM
ok, so ive got a small server running. i host a web site for me and a few of my friends just for kicks. i have samba which puts an external Hdd on the network so i have all my music videos and media on every computer. but when issuing

free -m

it tells me i only have like 5 or six megs free when samba is running and being used. so i tell it to empty cache

sync; echo 3 > /proc/sys/vm/drop_caches

but it just goes rite back down again. how can i fix this? its making slower which sucks..

January 10th, 2011, 04:41 PM
Post the output of free -m :)

January 11th, 2011, 05:53 AM
root@Connors-Server:~# free -m
total used free shared buffers cached
Mem: 488 269 218 0 1 26
-/+ buffers/cache: 241 246
Swap: 3151 0 3151

this is after running the free memory command...

And then it just goes down from there... not cool.

January 11th, 2011, 06:07 AM
That looks about right for the base server install. Does the cached memory increase?

Here's what my free -m looks like:

charles@thor:~$ free -m
total used free shared buffers cached
Mem: 5981 5934 46 0 173 3582
-/+ buffers/cache: 2179 3802
Swap: 17523 0 17523

Check how much memory is being used by cache. That's "free" memory, that the system is using for disk caching, it'll be freed up automatically if needed.

EDIT: Here's what free -m looks like on one of my machines running Ubuntu Desktop:

charles@lucid:~$ free -m
total used free shared buffers cached
Mem: 497 466 30 0 16 138
-/+ buffers/cache: 312 185
Swap: 894 171 723

January 11th, 2011, 06:21 AM
Ohhh. ok i just must have slow network tthen. any way to speed up my server?. ill check from school and its kinda( ALOTA) slow

January 11th, 2011, 06:27 AM
Depends on what you are doing with it.

Are you trying to access files remotely?

January 11th, 2011, 07:57 AM
ive got samba and a web server on it,

January 11th, 2011, 08:04 AM
It should be able to handle that.

If you are accessing files from the web server, it'll be limited by the upload speed of your connection.

January 12th, 2011, 08:19 AM
Thanks for the info im new to this whole server thing and i thought itd be fun and it turns out that a different computer on the network was downloading a fairly large torrent :O but its up to speed now. got my games and music mounted on every computer (and xbox) in the house :) thanks man.