Memory Leak???

Status
Not open for further replies.

Credo

Dabbler
Joined
May 28, 2011
Messages
28
Hello. Maybe I'm not reading the system information correctly, but I seem to be losing available memory somewhere.

I've just installed an additional 4Gb RAM to a total of 8Gb.

See attached image: My memory utilization seems to keep growing with nothing really running.




Should this be climbing like this? It was doing the same when I had only 4GB. I'm running the latest version of the AMD64 OS. 8Gb ram, Dual Intel Xenon processor.

Could someone please provide some assistance? Am I panicking over nothing?
 

Credo

Dabbler
Joined
May 28, 2011
Messages
28
Metro,

Thanks for the tip. Here's the output when I run top:

Code:
last pid:  6676;  load averages:  0.08,  0.02,  0.01       up 0+04:59:25  22:03:03
41 processes:  1 running, 40 sleeping
CPU:  2.0% user,  0.0% nice,  1.1% system,  0.0% interrupt, 96.8% idle
Mem: 80M Active, 36M Inact, 6214M Wired, 3772K Cache, 468M Buf, 1580M Free
Swap: 10G Total, 10G Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
 6152 root          1  44    0 45784K 10060K select  0   0:44  0.00% smbd
 1579 root          1  44    0 11780K  2768K select  2   0:08  0.00% ntpd
 1875 avahi         1  44    0 16932K  2928K select  2   0:06  0.00% avahi-daemon
 1869 root          7  44    0 66064K 10388K ucond   0   0:06  0.00% collectd
 2221 www           1  44    0 19328K  4160K kqread  1   0:01  0.00% lighttpd
 1773 root          6  44    0    98M 50780K uwait   1   0:01  0.00% python
 1450 root          1  44    0 36916K  6016K select  2   0:00  0.00% nmbd
 2312 root          1  76    0 60972K 21480K ttyin   3   0:00  0.00% python
 1982 root          1  47    0  7832K  1520K nanslp  0   0:00  0.00% cron
 1220 root          1  44    0  6904K  1488K select  1   0:00  0.00% syslogd
 6670 root          1  44    0  9224K  2788K CPU1    1   0:00  0.00% top
 6589 root          1  44    0 33304K  5056K sbwait  1   0:00  0.00% sshd
 1454 root          1  44    0 45492K  8708K select  1   0:00  0.00% smbd
 1759 root          1  45    0 20376K  3060K select  2   0:00  0.00% afpd
 6659 chris         1  44    0 33304K  5092K select  0   0:00  0.00% sshd
 6663 root          1  44    0 10172K  2728K pause   1   0:00  0.00% csh
 6662 chris         1  44    0 19368K  1784K wait    2   0:00  0.00% su
  914 root          1  44    0  3200K   716K select  2   0:00  0.00% devd
 6660 chris         1  44    0  8152K  1716K wait    1   0:00  0.00% sh
 2315 root          1  76    0  6772K  1272K ttyin   2   0:00  0.00% getty
 2318 root          1  76    0  6772K  1272K ttyin   2   0:00  0.00% getty
 2314 root          1  76    0  6772K  1272K ttyin   2   0:00  0.00% getty
 1757 root          1  44    0  7840K  1596K select  3   0:00  0.00% cnid_metad
 1971 root          1  44    0 24976K  4548K select  2   0:00  0.00% sshd
 2313 root          1  76    0  6772K  1272K ttyin   1   0:00  0.00% getty
 2316 root          1  76    0  6772K  1272K ttyin   0   0:00  0.00% getty
 2317 root          1  76    0  6772K  1272K ttyin   3   0:00  0.00% getty
 2319 root          1  76    0  6772K  1272K ttyin   1   0:00  0.00% getty
 1810 messagebus    1  49    0  7980K  2028K select  2   0:00  0.00% dbus-daemon
 1534 root          1  44    0 45492K  8672K select  2   0:00  0.00% smbd


Nothing seems to be using much memory, but since the last post - take a look at my memory usage now:



Now, I'm over 6Gb!!!! :mad:
 
Joined
May 27, 2011
Messages
566
i'd bet it's the cache used by ZFS but i'm not 100% sure on that. mine jumps up when i start making transfers only drops after a few hours of inactivity, but it never goes to much higher than 6 GB (of my 8).
 

Credo

Dabbler
Joined
May 28, 2011
Messages
28
I wonder if it is my ZFS. I'm running 2 x 4tb in raidz. I read in the old forum you need about 1Gb RAM per TB of drive space in ZFS. Is this true? If so, I might bump up to 16Gb.
 

metro305

Cadet
Joined
May 29, 2011
Messages
4
The addition of a resource with out any need is wasteful and inefficient so IF indeed the RAM allocation in your system is to the ZFS cache this is good behavior. My question is did you see performance gains from when you started with 4GB now up to 8GB? You should be benchmarking each change in hardware to validate your build and changes.

From all my reading the use of RAM in ZFS is intentional as there are components under the ZFS hood that leverage your RAM. I came across this page that may assist you in understanding ZFS and discussions of such tuning. http://wiki.freebsd.org/ZFSTuningGuide

ZFS can be a complex beast when tuning and each workload optimization depends on your sensitivity to perfection. I am not expert and I am learning so I hope someone can stop by and educate us exactly why you are seeing such memory usage. I would agree with matthewowen01 that it is the ZFS compenents using up the RAM.
 
I

ixdwhite

Guest
The graphs show normal behavior .. FreeBSD caches data fairly aggressively so Free memory is moved into Inactive as files are accessed and the data cached. If the system needs more Free memory it cleans pages from Inactive. As long as Inactive + Free is a healthy amount everything is fine.

ZFS will chew up a lot of Wired memory for its own cache but it should cap at about 80% of total memory.
 

Credo

Dabbler
Joined
May 28, 2011
Messages
28
Well, I've upgraded my NAS to 16Gb Ram - probably overkill, but sometimes the wired still jumps up to 15Gb used. I've had no problems though - it's running like a top! I figured most of the wired memory is reserved for the ZFS which is why I decided to move up to 16gb.

Thanks everyone for your suggestions though.
 
Status
Not open for further replies.
Top