# [SOLVED]daemon for ksm - Kernel Samepage Merging

## cassiol

heloo

gentoo need daemon for ksm.  for more information about ksm read documentation/vm/ksm.txt

basicaly daemon need set 1 in sys/kernel/ksm/run and set sys/kernel/mm/ksm/max_kernel_pages

to max_kernel_pages redhat use that

default_max_kernel_pages () {

    local total pagesize

    total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo`

    pagesize=`getconf PAGESIZE`

    echo $[total * 1024 / pagesize / 2]

}

----------

## cassiol

this post solve the trouble

http://bud-it.blogspot.com/2010/01/enabling-ksm-on-gentoo.html

thank's Paulo Tobias

----------

