A lot of memory without reason

I have 16 Giga RAM on my computer. My computers now I am writing this post runs orage, vlc, xpad, chrome and mousepad. But my computer uses 78% of my RAM! What's going on?

Code:
[FILE][B]uname -a[/B][/FILE]
FreeBSD BSD|ZFS 9.0-RELEASE FreeBSD 9.0-RELEASE #1: Tue Jan 17 14:33:28 EET 2012     root@BSD|ZFS:/usr/obj/usr/src/sys/MYKERNEL  amd64
 
I read this: http://www.freebsd.org/doc/en_US.ISO...ml#TOP-FREEMEM
I agree. Ok. But sometimes push it to the limits and my system start to hang! This should not happen! Ok for 70%, 80% but 97% ? And sometimes increasing very fast!
But also I read this section:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/book.html#COMPATIBILITY-MEMORY
I use 16 GIGA and over 4 GIGA if understood right need PAE option on my kernel. My kernel has not this option. So I am going to add and recompile the kernel to see if there is any difference.
But if is this the problem how to add it?
If you wish to create your own kernel configuration file, you can enable PAE by adding the following line to your configuration:
Code:
options       PAE
But
Code:
ember /usr/src $ sudo make buildkernel KERNCONF=MYKERNEL

--------------------------------------------------------------
>>> Kernel build for MYKERNEL started on Thu Jan 26 02:39:10 EET 2012
--------------------------------------------------------------
===> MYKERNEL
mkdir -p /usr/obj/usr/src/sys

--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src/sys/amd64/conf;  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  config  -d /usr/obj/usr/src/sys/MYKERNEL  /usr/src/sys/amd64/conf/MYKERNEL
/usr/src/sys/amd64/conf/MYKERNEL: unknown option "PAE"
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
Also not sure if is needed because I use 64 bit.
Ok. Now I start scratching my head :q
 
Try disabling prefetch and limiting the ARC value to 3 quarters the size of your RAM.

In /boot/loader.conf

Code:
vfs.zfs.prefetch_disable=1
vfs.zfs.arc_max="12288M"

In my desktop running 9-STABLE with 4G I don't need to do any tuning anymore. If you still don't see any improvement you can limit the ARC to half the size of your RAM.
 
sk8harddiefast said:
Yeap. I run ZFS.

And this is normal?

It is perfectly normal except that ZFS doesn't autotune too well with the size of ARC cache and it's possible that you run out of memory when the ARC cache grows too big. Do what gkontos suggested and limit the size of ARC cache with the vfs.zfs.arc_max tunable.

Otherwise it is what was said earlier, "free memory is wasted memory".
 
sk8harddiefast said:
Yeap. I run ZFS.

And this is normal?

Yeah, ZFS caches very aggressively ... always remember "free memory is wasted memory".
If you're not using it, and it can improve performance, the usage is more than welcome.

Of course, you can tune this behavior using the tunables that the others metioned regarding the use of prefetch and the min/max size of the arc (oh, and dedupe also affects memory consumption)

http://www.solarisinternals.com/wik...y_and_Dynamic_Reconfiguration_Recommendations

Read the best practices guide and evil tuning guide to have a slightly deep understanding of how ZFS works, and then you can search for FreeBSD-specific things.

Regards.

P.S → If my memory doesn't fail, ZFS uses "wired" (not inactive as UFS does) for the ARC, in any case, you can read the stats from the sysctl or, if you want something more sweet to read, check sysutils/zfs-stats
 
@gkontos trick work for now. I see difference on memory. For now I close the thread as Solved. If something goes wrong on future I will back
 
Back
Top