Hello, F12 x86_64 with Qemu/KVM booted yesterday evening. It has two guests with CentOS 5.3 x86_64 configured to auto-start and now they are running... I see this morning, some minutes ago: [root@virtfed ~]# service ksm status ksm is not running
My config: [root@virtfed ~]# chkconfig --list|grep ksm ksm 0:off 1:off 2:on 3:on 4:on 5:on 6:off ksmtuned 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 3786
Then I start two other guests, both with CentOS 5.4 x86_64. After a while: [root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 4752 [root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 5219 ... [root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 90895
and now, without any action at my side: [root@virtfed ~]# service ksm status ksm is running
Is this normal/expected? Any deeper doc/link about ksm/ksmtuned logic? Is it ksmtuned that spins ksm as it is needed? Any log file to check/configure? I read https://fedoraproject.org/wiki/Features/KSM but probably I'm missing something...
Thanks, Gianluca
On Tue, Nov 24, 2009 at 11:53:46AM +0100, Gianluca Cecchi wrote:
Hello, F12 x86_64 with Qemu/KVM booted yesterday evening. It has two guests with CentOS 5.3 x86_64 configured to auto-start and now they are running... I see this morning, some minutes ago: [root@virtfed ~]# service ksm status ksm is not running
My config: [root@virtfed ~]# chkconfig --list|grep ksm ksm 0:off 1:off 2:on 3:on 4:on 5:on 6:off ksmtuned 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 3786
Then I start two other guests, both with CentOS 5.4 x86_64. After a while: [root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 4752 [root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 5219 ... [root@virtfed ~]# cat /sys/kernel/mm/ksm/pages_shared 90895
and now, without any action at my side: [root@virtfed ~]# service ksm status ksm is running
Is this normal/expected? Any deeper doc/link about ksm/ksmtuned logic? Is it ksmtuned that spins ksm as it is needed? Any log file to check/configure? I read https://fedoraproject.org/wiki/Features/KSM but probably I'm missing something...
yes, the purpose of ksmtuned is to tune ksm parameters, or stop it altogether if it is not needed. In case your two virtual machines required less than available memeory, ksm is not used. If ksmtune senses that memory stress has risen, it fires up ksm again.
I don't think this is written anywhere but in the code.. We probably should add something to the "User experience" section to that feature page. How about:
Fedora's kvm comes with 2 services controlling the behavior of ksm. One, simply called ksm, is just a nice means to start and stop ksm's kernel thread. The other, called ksmtuned, controls the first service and tunes its parameters according to the memory stress that is generated by KVM virtual machines.
Thanks, Gianluca
Fedora-virt mailing list Fedora-virt@redhat.com https://www.redhat.com/mailman/listinfo/fedora-virt
On Tue, Nov 24, 2009 at 12:50 PM, Dan Kenigsberg danken@redhat.com wrote:
yes, the purpose of ksmtuned is to tune ksm parameters, or stop it altogether if it is not needed. In case your two virtual machines required less than available memeory, ksm is not used. If ksmtune senses that memory stress has risen, it fires up ksm again.
I don't think this is written anywhere but in the code.. We probably should add something to the "User experience" section to that feature page. How about:
Fedora's kvm comes with 2 services controlling the behavior of ksm. One, simply called ksm, is just a nice means to start and stop ksm's kernel thread. The other, called ksmtuned, controls the first service and tunes its parameters according to the memory stress that is generated by KVM virtual machines.
It sounds good; I would only add something like this:
"In case of need, e.g. in minor load situations, ksmtuned can also stop ksm service at all. Later, if ksmtuned senses that memory stress has risen, it will fire up ksm again."
So that one knows that to monitor the status of ksm is not a good idea in general..... Any log configurable to see/trace ksmtuned decisions (start ksm, stop ksm, increase pages...)?
Gianluca
On 11/24/2009 05:31 PM, Gianluca Cecchi wrote:
On Tue, Nov 24, 2009 at 12:50 PM, Dan Kenigsbergdanken@redhat.com wrote:
yes, the purpose of ksmtuned is to tune ksm parameters, or stop it altogether if it is not needed. In case your two virtual machines required less than available memeory, ksm is not used. If ksmtune senses that memory stress has risen, it fires up ksm again.
I don't think this is written anywhere but in the code.. We probably should add something to the "User experience" section to that feature page. How about:
Fedora's kvm comes with 2 services controlling the behavior of ksm. One, simply called ksm, is just a nice means to start and stop ksm's kernel thread. The other, called ksmtuned, controls the first service and tunes its parameters according to the memory stress that is generated by KVM virtual machines.
It sounds good; I would only add something like this:
"In case of need, e.g. in minor load situations, ksmtuned can also stop ksm service at all. Later, if ksmtuned senses that memory stress has risen, it will fire up ksm again."
So that one knows that to monitor the status of ksm is not a good idea in general..... Any log configurable to see/trace ksmtuned decisions (start ksm, stop ksm, increase pages...)?
yes, configuratble log/trace info for ksm/ksmtuned would be useful.
I see this for configuration stuff - /etc/ksmtuned.conf
/kashyap
Gianluca
Fedora-virt mailing list Fedora-virt@redhat.com https://www.redhat.com/mailman/listinfo/fedora-virt
On Tue, Nov 24, 2009 at 06:43:42PM +0530, kashyap chamarthy wrote:
On 11/24/2009 05:31 PM, Gianluca Cecchi wrote:
On Tue, Nov 24, 2009 at 12:50 PM, Dan Kenigsbergdanken@redhat.com wrote:
yes, the purpose of ksmtuned is to tune ksm parameters, or stop it altogether if it is not needed. In case your two virtual machines required less than available memeory, ksm is not used. If ksmtune senses that memory stress has risen, it fires up ksm again.
I don't think this is written anywhere but in the code.. We probably should add something to the "User experience" section to that feature page. How about:
Fedora's kvm comes with 2 services controlling the behavior of ksm. One, simply called ksm, is just a nice means to start and stop ksm's kernel thread. The other, called ksmtuned, controls the first service and tunes its parameters according to the memory stress that is generated by KVM virtual machines.
It sounds good; I would only add something like this:
"In case of need, e.g. in minor load situations, ksmtuned can also stop ksm service at all. Later, if ksmtuned senses that memory stress has risen, it will fire up ksm again."
So that one knows that to monitor the status of ksm is not a good idea in general..... Any log configurable to see/trace ksmtuned decisions (start ksm, stop ksm, increase pages...)?
yes, configuratble log/trace info for ksm/ksmtuned would be useful.
I see this for configuration stuff - /etc/ksmtuned.conf
/kashyap
You'd have to apply the following patch to /usr/sbin/ksmtuned for it to easily log into /var/log/ksmtuned. You'd have to add two lines to /etc/ksmtuned.conf for this to actually work.
Regards,
Dan.
--- ksmtuned | 25 ++++++++++++++++--------- ksmtuned.conf | 5 +++++ 2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/ksmtuned b/ksmtuned index 7da8b68..decf41d 100644 --- a/ksmtuned +++ b/ksmtuned @@ -21,6 +21,13 @@ if [ -f /etc/ksmtuned.conf ]; then . /etc/ksmtuned.conf fi
+debug() { + if [ -n "$DEBUG" ]; then + s="`/bin/date`: $*" + [ -n "$LOGFILE" ] && echo "$s" >> "$LOGFILE" || echo "$s" + fi +} + KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60} KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300} KSM_NPAGES_DECAY=${KSM_NPAGES_DECAY:--50} @@ -35,17 +42,17 @@ KSM_THRES_COEF=${KSM_THRES_COEF:-20} KSM_THRES_CONST=${KSM_THRES_CONST:-2048}
total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` -[ -n "$DEBUG" ] && echo total $total +debug total $total
npages=0 sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total] [ $sleep -le 10 ] && sleep=10 -[ -n "$DEBUG" ] && echo sleep $sleep +debug sleep $sleep thres=$[total * KSM_THRES_COEF / 100] if [ $KSM_THRES_CONST -gt $thres ]; then thres=$KSM_THRES_CONST fi -[ -n "$DEBUG" ] && echo thres $thres +debug thres $thres
KSMCTL () { case x$1 in @@ -89,22 +96,22 @@ adjust () { local free committed free=`free_memory` committed=`committed_memory` - [ -n "$DEBUG" ] && echo committed $committed free $free + debug committed $committed free $free if [ $[committed + thres] -lt $total -a $free -gt $thres ]; then KSMCTL stop - [ -n "$DEBUG" ] && echo "$[committed + thres] < $total and free > $thres, stop ksm" + debug "$[committed + thres] < $total and free > $thres, stop ksm" return 1 fi - [ -n "$DEBUG" ] && echo "$[committed + thres] > $total, start ksm" + debug "$[committed + thres] > $total, start ksm" if [ $free -lt $thres ]; then npages=`increase_npages $KSM_NPAGES_BOOST` - [ -n "$DEBUG" ] && echo "$free < $thres, boost" + debug "$free < $thres, boost" else npages=`increase_npages $KSM_NPAGES_DECAY` - [ -n "$DEBUG" ] && echo "$free > $thres, decay" + debug "$free > $thres, decay" fi KSMCTL start $npages $sleep - [ -n "$DEBUG" ] && echo "KSMCTL start $npages $sleep" + debug "KSMCTL start $npages $sleep" return 0 }
diff --git a/ksmtuned.conf b/ksmtuned.conf index 87b9178..fc4518c 100644 --- a/ksmtuned.conf +++ b/ksmtuned.conf @@ -14,3 +14,8 @@
# KSM_THRES_COEF=20 # KSM_THRES_CONST=2048 + +# uncomment the following if you want ksmtuned debug info + +# LOGFILE=/var/log/ksmtuned +# DEBUG=1
On Tue, Nov 24, 2009 at 04:31:34PM +0200, Dan Kenigsberg wrote:
ksmtuned | 25 ++++++++++++++++--------- ksmtuned.conf | 5 +++++ 2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/ksmtuned b/ksmtuned index 7da8b68..decf41d 100644 --- a/ksmtuned +++ b/ksmtuned @@ -21,6 +21,13 @@ if [ -f /etc/ksmtuned.conf ]; then . /etc/ksmtuned.conf fi
+debug() {
- if [ -n "$DEBUG" ]; then
s="`/bin/date`: $*"[ -n "$LOGFILE" ] && echo "$s" >> "$LOGFILE" || echo "$s"- fi
+}
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60} KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300} KSM_NPAGES_DECAY=${KSM_NPAGES_DECAY:--50} @@ -35,17 +42,17 @@ KSM_THRES_COEF=${KSM_THRES_COEF:-20} KSM_THRES_CONST=${KSM_THRES_CONST:-2048}
total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` -[ -n "$DEBUG" ] && echo total $total +debug total $total
npages=0 sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total] [ $sleep -le 10 ] && sleep=10 -[ -n "$DEBUG" ] && echo sleep $sleep +debug sleep $sleep thres=$[total * KSM_THRES_COEF / 100] if [ $KSM_THRES_CONST -gt $thres ]; then thres=$KSM_THRES_CONST fi -[ -n "$DEBUG" ] && echo thres $thres +debug thres $thres
KSMCTL () { case x$1 in @@ -89,22 +96,22 @@ adjust () { local free committed free=`free_memory` committed=`committed_memory`
- [ -n "$DEBUG" ] && echo committed $committed free $free
- debug committed $committed free $free if [ $[committed + thres] -lt $total -a $free -gt $thres ]; then KSMCTL stop
[ -n "$DEBUG" ] && echo "$[committed + thres] < $total and free > $thres, stop ksm"
fidebug "$[committed + thres] < $total and free > $thres, stop ksm" return 1
- [ -n "$DEBUG" ] && echo "$[committed + thres] > $total, start ksm"
- debug "$[committed + thres] > $total, start ksm" if [ $free -lt $thres ]; then npages=`increase_npages $KSM_NPAGES_BOOST`
[ -n "$DEBUG" ] && echo "$free < $thres, boost"
else npages=`increase_npages $KSM_NPAGES_DECAY`debug "$free < $thres, boost"
[ -n "$DEBUG" ] && echo "$free > $thres, decay"
fi KSMCTL start $npages $sleepdebug "$free > $thres, decay"
- [ -n "$DEBUG" ] && echo "KSMCTL start $npages $sleep"
- debug "KSMCTL start $npages $sleep" return 0
}
diff --git a/ksmtuned.conf b/ksmtuned.conf index 87b9178..fc4518c 100644 --- a/ksmtuned.conf +++ b/ksmtuned.conf @@ -14,3 +14,8 @@
# KSM_THRES_COEF=20 # KSM_THRES_CONST=2048
+# uncomment the following if you want ksmtuned debug info
+# LOGFILE=/var/log/ksmtuned
+# DEBUG=1
Patch looks good, I will get it applied. I will also add a logrotate file so that this log doesn't grow unrestrained.
Justin
On Tue, Nov 24, 2009 at 12:52:51PM -0600, Justin M. Forbes wrote:
On Tue, Nov 24, 2009 at 04:31:34PM +0200, Dan Kenigsberg wrote:
ksmtuned | 25 ++++++++++++++++--------- ksmtuned.conf | 5 +++++ 2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/ksmtuned b/ksmtuned index 7da8b68..decf41d 100644 --- a/ksmtuned +++ b/ksmtuned @@ -21,6 +21,13 @@ if [ -f /etc/ksmtuned.conf ]; then . /etc/ksmtuned.conf fi
+debug() {
- if [ -n "$DEBUG" ]; then
s="`/bin/date`: $*"[ -n "$LOGFILE" ] && echo "$s" >> "$LOGFILE" || echo "$s"- fi
+}
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60} KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300} KSM_NPAGES_DECAY=${KSM_NPAGES_DECAY:--50} @@ -35,17 +42,17 @@ KSM_THRES_COEF=${KSM_THRES_COEF:-20} KSM_THRES_CONST=${KSM_THRES_CONST:-2048}
total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` -[ -n "$DEBUG" ] && echo total $total +debug total $total
npages=0 sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total] [ $sleep -le 10 ] && sleep=10 -[ -n "$DEBUG" ] && echo sleep $sleep +debug sleep $sleep thres=$[total * KSM_THRES_COEF / 100] if [ $KSM_THRES_CONST -gt $thres ]; then thres=$KSM_THRES_CONST fi -[ -n "$DEBUG" ] && echo thres $thres +debug thres $thres
KSMCTL () { case x$1 in @@ -89,22 +96,22 @@ adjust () { local free committed free=`free_memory` committed=`committed_memory`
- [ -n "$DEBUG" ] && echo committed $committed free $free
- debug committed $committed free $free if [ $[committed + thres] -lt $total -a $free -gt $thres ]; then KSMCTL stop
[ -n "$DEBUG" ] && echo "$[committed + thres] < $total and free > $thres, stop ksm"
fidebug "$[committed + thres] < $total and free > $thres, stop ksm" return 1
- [ -n "$DEBUG" ] && echo "$[committed + thres] > $total, start ksm"
- debug "$[committed + thres] > $total, start ksm" if [ $free -lt $thres ]; then npages=`increase_npages $KSM_NPAGES_BOOST`
[ -n "$DEBUG" ] && echo "$free < $thres, boost"
else npages=`increase_npages $KSM_NPAGES_DECAY`debug "$free < $thres, boost"
[ -n "$DEBUG" ] && echo "$free > $thres, decay"
fi KSMCTL start $npages $sleepdebug "$free > $thres, decay"
- [ -n "$DEBUG" ] && echo "KSMCTL start $npages $sleep"
- debug "KSMCTL start $npages $sleep" return 0
}
diff --git a/ksmtuned.conf b/ksmtuned.conf index 87b9178..fc4518c 100644 --- a/ksmtuned.conf +++ b/ksmtuned.conf @@ -14,3 +14,8 @@
# KSM_THRES_COEF=20 # KSM_THRES_CONST=2048
+# uncomment the following if you want ksmtuned debug info
+# LOGFILE=/var/log/ksmtuned
+# DEBUG=1
Patch looks good, I will get it applied. I will also add a logrotate file so that this log doesn't grow unrestrained.
Justin
Mark, Justin: would you push it for Fedora 13?
On Tue, 2010-03-02 at 10:26 +0200, Dan Kenigsberg wrote:
On Tue, Nov 24, 2009 at 12:52:51PM -0600, Justin M. Forbes wrote:
On Tue, Nov 24, 2009 at 04:31:34PM +0200, Dan Kenigsberg wrote:
ksmtuned | 25 ++++++++++++++++--------- ksmtuned.conf | 5 +++++ 2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/ksmtuned b/ksmtuned index 7da8b68..decf41d 100644 --- a/ksmtuned +++ b/ksmtuned @@ -21,6 +21,13 @@ if [ -f /etc/ksmtuned.conf ]; then . /etc/ksmtuned.conf fi
+debug() {
- if [ -n "$DEBUG" ]; then
s="`/bin/date`: $*"[ -n "$LOGFILE" ] && echo "$s" >> "$LOGFILE" || echo "$s"- fi
+}
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60} KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300} KSM_NPAGES_DECAY=${KSM_NPAGES_DECAY:--50} @@ -35,17 +42,17 @@ KSM_THRES_COEF=${KSM_THRES_COEF:-20} KSM_THRES_CONST=${KSM_THRES_CONST:-2048}
total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` -[ -n "$DEBUG" ] && echo total $total +debug total $total
npages=0 sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total] [ $sleep -le 10 ] && sleep=10 -[ -n "$DEBUG" ] && echo sleep $sleep +debug sleep $sleep thres=$[total * KSM_THRES_COEF / 100] if [ $KSM_THRES_CONST -gt $thres ]; then thres=$KSM_THRES_CONST fi -[ -n "$DEBUG" ] && echo thres $thres +debug thres $thres
KSMCTL () { case x$1 in @@ -89,22 +96,22 @@ adjust () { local free committed free=`free_memory` committed=`committed_memory`
- [ -n "$DEBUG" ] && echo committed $committed free $free
- debug committed $committed free $free if [ $[committed + thres] -lt $total -a $free -gt $thres ]; then KSMCTL stop
[ -n "$DEBUG" ] && echo "$[committed + thres] < $total and free > $thres, stop ksm"
fidebug "$[committed + thres] < $total and free > $thres, stop ksm" return 1
- [ -n "$DEBUG" ] && echo "$[committed + thres] > $total, start ksm"
- debug "$[committed + thres] > $total, start ksm" if [ $free -lt $thres ]; then npages=`increase_npages $KSM_NPAGES_BOOST`
[ -n "$DEBUG" ] && echo "$free < $thres, boost"
else npages=`increase_npages $KSM_NPAGES_DECAY`debug "$free < $thres, boost"
[ -n "$DEBUG" ] && echo "$free > $thres, decay"
fi KSMCTL start $npages $sleepdebug "$free > $thres, decay"
- [ -n "$DEBUG" ] && echo "KSMCTL start $npages $sleep"
- debug "KSMCTL start $npages $sleep" return 0
}
diff --git a/ksmtuned.conf b/ksmtuned.conf index 87b9178..fc4518c 100644 --- a/ksmtuned.conf +++ b/ksmtuned.conf @@ -14,3 +14,8 @@
# KSM_THRES_COEF=20 # KSM_THRES_CONST=2048
+# uncomment the following if you want ksmtuned debug info
+# LOGFILE=/var/log/ksmtuned
+# DEBUG=1
Patch looks good, I will get it applied. I will also add a logrotate file so that this log doesn't grow unrestrained.
Justin
Mark, Justin: would you push it for Fedora 13?
It has been pushed for F-13 since we moved to 0.12.
Justin
On Tue, Mar 02, 2010 at 07:11:17AM -0600, Justin M. Forbes wrote:
On Tue, 2010-03-02 at 10:26 +0200, Dan Kenigsberg wrote:
On Tue, Nov 24, 2009 at 12:52:51PM -0600, Justin M. Forbes wrote:
On Tue, Nov 24, 2009 at 04:31:34PM +0200, Dan Kenigsberg wrote:
ksmtuned | 25 ++++++++++++++++--------- ksmtuned.conf | 5 +++++ 2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/ksmtuned b/ksmtuned index 7da8b68..decf41d 100644 --- a/ksmtuned +++ b/ksmtuned @@ -21,6 +21,13 @@ if [ -f /etc/ksmtuned.conf ]; then . /etc/ksmtuned.conf fi
+debug() {
- if [ -n "$DEBUG" ]; then
s="`/bin/date`: $*"[ -n "$LOGFILE" ] && echo "$s" >> "$LOGFILE" || echo "$s"- fi
+}
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60} KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300} KSM_NPAGES_DECAY=${KSM_NPAGES_DECAY:--50} @@ -35,17 +42,17 @@ KSM_THRES_COEF=${KSM_THRES_COEF:-20} KSM_THRES_CONST=${KSM_THRES_CONST:-2048}
total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` -[ -n "$DEBUG" ] && echo total $total +debug total $total
npages=0 sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total] [ $sleep -le 10 ] && sleep=10 -[ -n "$DEBUG" ] && echo sleep $sleep +debug sleep $sleep thres=$[total * KSM_THRES_COEF / 100] if [ $KSM_THRES_CONST -gt $thres ]; then thres=$KSM_THRES_CONST fi -[ -n "$DEBUG" ] && echo thres $thres +debug thres $thres
KSMCTL () { case x$1 in @@ -89,22 +96,22 @@ adjust () { local free committed free=`free_memory` committed=`committed_memory`
- [ -n "$DEBUG" ] && echo committed $committed free $free
- debug committed $committed free $free if [ $[committed + thres] -lt $total -a $free -gt $thres ]; then KSMCTL stop
[ -n "$DEBUG" ] && echo "$[committed + thres] < $total and free > $thres, stop ksm"
fidebug "$[committed + thres] < $total and free > $thres, stop ksm" return 1
- [ -n "$DEBUG" ] && echo "$[committed + thres] > $total, start ksm"
- debug "$[committed + thres] > $total, start ksm" if [ $free -lt $thres ]; then npages=`increase_npages $KSM_NPAGES_BOOST`
[ -n "$DEBUG" ] && echo "$free < $thres, boost"
else npages=`increase_npages $KSM_NPAGES_DECAY`debug "$free < $thres, boost"
[ -n "$DEBUG" ] && echo "$free > $thres, decay"
fi KSMCTL start $npages $sleepdebug "$free > $thres, decay"
- [ -n "$DEBUG" ] && echo "KSMCTL start $npages $sleep"
- debug "KSMCTL start $npages $sleep" return 0
}
diff --git a/ksmtuned.conf b/ksmtuned.conf index 87b9178..fc4518c 100644 --- a/ksmtuned.conf +++ b/ksmtuned.conf @@ -14,3 +14,8 @@
# KSM_THRES_COEF=20 # KSM_THRES_CONST=2048
+# uncomment the following if you want ksmtuned debug info
+# LOGFILE=/var/log/ksmtuned
+# DEBUG=1
Patch looks good, I will get it applied. I will also add a logrotate file so that this log doesn't grow unrestrained.
Justin
Mark, Justin: would you push it for Fedora 13?
It has been pushed for F-13 since we moved to 0.12.
Oh, I did not know that. Can one see a trace of it in http://gitorious.org/ksm-control-scripts/ksm-control-scripts ?
On Tue, 2010-03-02 at 15:21 +0200, Dan Kenigsberg wrote:
Mark, Justin: would you push it for Fedora 13?
It has been pushed for F-13 since we moved to 0.12.
Oh, I did not know that. Can one see a trace of it in http://gitorious.org/ksm-control-scripts/ksm-control-scripts ?
I have added it now. Sorry, I completely forgot about that repos. It's kind of out there on its own. Pushed now.
Justin
On 11/24/2009 08:00 PM, Dan Kenigsberg wrote:
On Tue, Nov 24, 2009 at 06:43:42PM +0530, kashyap chamarthy wrote:
On 11/24/2009 05:31 PM, Gianluca Cecchi wrote:
On Tue, Nov 24, 2009 at 12:50 PM, Dan Kenigsbergdanken@redhat.com wrote:
yes, the purpose of ksmtuned is to tune ksm parameters, or stop it altogether if it is not needed. In case your two virtual machines required less than available memeory, ksm is not used. If ksmtune senses that memory stress has risen, it fires up ksm again.
I don't think this is written anywhere but in the code.. We probably should add something to the "User experience" section to that feature page. How about:
Fedora's kvm comes with 2 services controlling the behavior of ksm. One, simply called ksm, is just a nice means to start and stop ksm's kernel thread. The other, called ksmtuned, controls the first service and tunes its parameters according to the memory stress that is generated by KVM virtual machines.
It sounds good; I would only add something like this:
"In case of need, e.g. in minor load situations, ksmtuned can also stop ksm service at all. Later, if ksmtuned senses that memory stress has risen, it will fire up ksm again."
So that one knows that to monitor the status of ksm is not a good idea in general..... Any log configurable to see/trace ksmtuned decisions (start ksm, stop ksm, increase pages...)?
yes, configuratble log/trace info for ksm/ksmtuned would be useful.
I see this for configuration stuff - /etc/ksmtuned.conf
/kashyap
You'd have to apply the following patch to /usr/sbin/ksmtuned for it to easily log into /var/log/ksmtuned. You'd have to add two lines to /etc/ksmtuned.conf for this to actually work.
thanks a lot. will try it.
/kashyap
Regards,
Dan.
On 11/24/2009 09:13 PM, Kashyap Chamarthy wrote:
On 11/24/2009 08:00 PM, Dan Kenigsberg wrote:
On Tue, Nov 24, 2009 at 06:43:42PM +0530, kashyap chamarthy wrote:
On 11/24/2009 05:31 PM, Gianluca Cecchi wrote:
On Tue, Nov 24, 2009 at 12:50 PM, Dan Kenigsbergdanken@redhat.com wrote:
yes, the purpose of ksmtuned is to tune ksm parameters, or stop it altogether if it is not needed. In case your two virtual machines required less than available memeory, ksm is not used. If ksmtune senses that memory stress has risen, it fires up ksm again.
I don't think this is written anywhere but in the code.. We probably should add something to the "User experience" section to that feature page. How about:
Fedora's kvm comes with 2 services controlling the behavior of ksm. One, simply called ksm, is just a nice means to start and stop ksm's kernel thread. The other, called ksmtuned, controls the first service and tunes its parameters according to the memory stress that is generated by KVM virtual machines.
It sounds good; I would only add something like this:
"In case of need, e.g. in minor load situations, ksmtuned can also stop ksm service at all. Later, if ksmtuned senses that memory stress has risen, it will fire up ksm again."
So that one knows that to monitor the status of ksm is not a good idea in general..... Any log configurable to see/trace ksmtuned decisions (start ksm, stop ksm, increase pages...)?
yes, configuratble log/trace info for ksm/ksmtuned would be useful.
I see this for configuration stuff - /etc/ksmtuned.conf
/kashyap
You'd have to apply the following patch to /usr/sbin/ksmtuned for it to easily log into /var/log/ksmtuned. You'd have to add two lines to /etc/ksmtuned.conf for this to actually work.
thanks a lot. will try it.
nice..after applying the patch and uncommenting the below lines in /etc/ksmtuned.conf throws ksmtuned activity under/var/log/ksmtuned
# LOGFILE=/var/log/ksmtuned # DEBUG=1
------------------------------------------------- [root@foobox ~]# /etc/init.d/ksmtuned restart Stopping ksmtuned: [ OK ] Starting ksmtuned: [ OK ] [root@foobox ~]# cat /var/log/ksmtuned Tue Nov 24 22:40:59 IST 2009: total 4019072 Tue Nov 24 22:40:59 IST 2009: sleep 41 Tue Nov 24 22:40:59 IST 2009: thres 803814 Tue Nov 24 22:41:50 IST 2009: total 4019072 Tue Nov 24 22:41:50 IST 2009: sleep 41 Tue Nov 24 22:41:50 IST 2009: thres 803814 ---------------------------------------------------
/kashyap
Regards,
Dan.
Fedora-virt mailing list Fedora-virt@redhat.com https://www.redhat.com/mailman/listinfo/fedora-virt