* [PATCH] KVM-test: Add two scripts to disable services for perf tests
@ 2011-09-07 6:07 Amos Kong
2011-09-07 8:07 ` Hagen Paul Pfeifer
2011-09-12 19:00 ` [Autotest] " Lucas Meneghel Rodrigues
0 siblings, 2 replies; 5+ messages in thread
From: Amos Kong @ 2011-09-07 6:07 UTC (permalink / raw)
To: autotest, lmr, kvm
System services on guest and host take uncertain resource, it effects
the perf results. We can use the below two scripts to disable some
services of host and guest.
stop_serivices_perf.sh is used to stop the running serivices.
off_service_perf.sh is used to off services when host starts up.
We can use them to prepare environment for performance testcases.
Signed-off-by: Amos Kong <akong@redhat.com>
---
client/tests/kvm/scripts/off_services_perf.sh | 27 ++++++++++++++++++++++++
client/tests/kvm/scripts/stop_services_perf.sh | 27 ++++++++++++++++++++++++
2 files changed, 54 insertions(+), 0 deletions(-)
create mode 100755 client/tests/kvm/scripts/off_services_perf.sh
create mode 100755 client/tests/kvm/scripts/stop_services_perf.sh
diff --git a/client/tests/kvm/scripts/off_services_perf.sh b/client/tests/kvm/scripts/off_services_perf.sh
new file mode 100755
index 0000000..6ddf168
--- /dev/null
+++ b/client/tests/kvm/scripts/off_services_perf.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+chkconfig auditd off
+chkconfig autofs off
+chkconfig avahi-daemon off
+chkconfig crond off
+chkconfig cups off
+chkconfig ip6tables off
+chkconfig sendmail off
+chkconfig smartd off
+chkconfig xfs off
+chkconfig acpid off
+chkconfig atd off
+chkconfig haldaemon off
+chkconfig mdmonitor off
+chkconfig netfs off
+chkconfig rhnsd off
+chkconfig rpcgssd off
+chkconfig rpcidmapd off
+chkconfig abrtd off
+chkconfig kdump off
+chkconfig koan off
+chkconfig libvirt-guests off
+chkconfig ntpdate off
+chkconfig portreserve off
+chkconfig postfix off
+chkconfig rhsmcertd off
+chkconfig tuned off
diff --git a/client/tests/kvm/scripts/stop_services_perf.sh b/client/tests/kvm/scripts/stop_services_perf.sh
new file mode 100755
index 0000000..84150b0
--- /dev/null
+++ b/client/tests/kvm/scripts/stop_services_perf.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+service auditd stop
+service avahi-daemon stop
+service anacron stop
+service qpidd stop
+service smartd stop
+service crond stop
+service haldaemon stop
+service opensmd stop
+service openibd stop
+service yum-updatesd stop
+service collectd stop
+service bluetooth stop
+service cups stop
+service cpuspeed stop
+service hidd stop
+service isdn stop
+service kudzu stop
+service lvm2-monitor stop
+service mcstrans stop
+service mdmonitor stop
+service messagebus stop
+service restorecond stop
+service rhnsd stop
+service rpcgssd stop
+service setroubleshoot stop
+service smartd stop
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM-test: Add two scripts to disable services for perf tests
2011-09-07 6:07 [PATCH] KVM-test: Add two scripts to disable services for perf tests Amos Kong
@ 2011-09-07 8:07 ` Hagen Paul Pfeifer
2011-09-09 2:23 ` Amos Kong
2011-09-12 19:00 ` [Autotest] " Lucas Meneghel Rodrigues
1 sibling, 1 reply; 5+ messages in thread
From: Hagen Paul Pfeifer @ 2011-09-07 8:07 UTC (permalink / raw)
To: Amos Kong; +Cc: autotest, lmr, kvm
On Wed, 07 Sep 2011 14:07:49 +0800, Amos Kong <akong@redhat.com> wrote:
> System services on guest and host take uncertain resource, it effects
> the perf results. We can use the below two scripts to disable some
> services of host and guest.
>
> stop_serivices_perf.sh is used to stop the running serivices.
> off_service_perf.sh is used to off services when host starts up.
>
> We can use them to prepare environment for performance testcases.
Which environment? I assume this should secured by an Distribution
specific guard:
E.g.
if [ -f /etc/redhat-release ] then
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM-test: Add two scripts to disable services for perf tests
2011-09-07 8:07 ` Hagen Paul Pfeifer
@ 2011-09-09 2:23 ` Amos Kong
0 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2011-09-09 2:23 UTC (permalink / raw)
To: lmr; +Cc: autotest, lmr, kvm
----- Original Message -----
> On Wed, 07 Sep 2011 14:07:49 +0800, Amos Kong <akong@redhat.com>
> wrote:
>
> > System services on guest and host take uncertain resource, it
> > effects
> > the perf results. We can use the below two scripts to disable some
> > services of host and guest.
> >
> > stop_serivices_perf.sh is used to stop the running serivices.
> > off_service_perf.sh is used to off services when host starts up.
> >
> > We can use them to prepare environment for performance testcases.
>
> Which environment? I assume this should secured by an Distribution
> specific guard:
prepare clean testing environment.
> E.g.
>
> if [ -f /etc/redhat-release ] then
yes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Autotest] [PATCH] KVM-test: Add two scripts to disable services for perf tests
2011-09-07 6:07 [PATCH] KVM-test: Add two scripts to disable services for perf tests Amos Kong
2011-09-07 8:07 ` Hagen Paul Pfeifer
@ 2011-09-12 19:00 ` Lucas Meneghel Rodrigues
2011-09-22 8:00 ` Amos Kong
1 sibling, 1 reply; 5+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-09-12 19:00 UTC (permalink / raw)
To: Amos Kong; +Cc: autotest, kvm
On Wed, Sep 7, 2011 at 3:07 AM, Amos Kong <akong@redhat.com> wrote:
> System services on guest and host take uncertain resource, it effects
> the perf results. We can use the below two scripts to disable some
> services of host and guest.
>
> stop_serivices_perf.sh is used to stop the running serivices.
> off_service_perf.sh is used to off services when host starts up.
Hi Amos, thanks! I've been thinking about those scripts, let me
summarize my thoughts:
* If we are going to make this using scripts, then we should try as
much as possible to be distro agnostic.
* We could detect services present on guest first before trying to
disable them, ie, instead of just issuing a service koan stop, verify
if there's a /etc/init.d/koan first.
* Have you considered doing this env setup using shell commands typed
on an ssh session, such as
session = vm.wait_for_login()
session.cmd('service auditd stop')
Rather than a script? It's one less script to maintain under the
scripts/ directory.
* Your approach is a blacklist of services that will be turned off.
What if we used a 'whitelist' approach and kept a list of the
fundamental services needed and turn off *everything else*?
Please let me know what you think about this. I'm not applying this for now.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Autotest] [PATCH] KVM-test: Add two scripts to disable services for perf tests
2011-09-12 19:00 ` [Autotest] " Lucas Meneghel Rodrigues
@ 2011-09-22 8:00 ` Amos Kong
0 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2011-09-22 8:00 UTC (permalink / raw)
To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm
----- Original Message -----
> On Wed, Sep 7, 2011 at 3:07 AM, Amos Kong <akong@redhat.com> wrote:
> > System services on guest and host take uncertain resource, it
> > effects
> > the perf results. We can use the below two scripts to disable some
> > services of host and guest.
> >
> > stop_serivices_perf.sh is used to stop the running serivices.
> > off_service_perf.sh is used to off services when host starts up.
>
> Hi Amos, thanks! I've been thinking about those scripts, let me
> summarize my thoughts:
>
> * If we are going to make this using scripts, then we should try as
> much as possible to be distro agnostic.
> * We could detect services present on guest first before trying to
> disable them, ie, instead of just issuing a service koan stop, verify
> if there's a /etc/init.d/koan first.
We have a black list, if one server exist in the guest (/etc/init.d/*),
then stop it.
Some services need to be disabled by 'chkconfig * off', we can execute a python/shell
script in post installation, checking if service exists is also necessary.
> * Have you considered doing this env setup using shell commands
> typed
> on an ssh session, such as
>
> session = vm.wait_for_login()
> session.cmd('service auditd stop')
>
> Rather than a script? It's one less script to maintain under the
> scripts/ directory.
>
> * Your approach is a blacklist of services that will be turned off.
> What if we used a 'whitelist' approach and kept a list of the
> fundamental services needed and turn off *everything else*?
Blacklist is safe and better, the whitelist is difficult to maintain.
> Please let me know what you think about this. I'm not applying this
> for now.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-22 8:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 6:07 [PATCH] KVM-test: Add two scripts to disable services for perf tests Amos Kong
2011-09-07 8:07 ` Hagen Paul Pfeifer
2011-09-09 2:23 ` Amos Kong
2011-09-12 19:00 ` [Autotest] " Lucas Meneghel Rodrigues
2011-09-22 8:00 ` Amos Kong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox