[libvirt] [PATCH] Priority of vzctl create should be lower

Yuji NISHIDA nishidy at nict.go.jp
Mon Oct 26 07:43:46 UTC 2009


Hi all

About OpenVZ, it uses vzctl command that produces tar/gzip commands.
I think we should lower these commands for running other procedures  
prior to them.
This is the patch to achieve it with nice/ionice commands.


 From ff3cf022995ef541136bd40579af2eeb20aeafdb Mon Sep 17 00:00:00 2001
From: root <root at node13.nvlab.org>
Date: Mon, 26 Oct 2009 02:44:43 +0000
Subject: [PATCH] lower priority for running tar and gzip during vzctl  
create

---
src/openvz/openvz_driver.c |    8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index f64ad1e..59d38ae 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -130,6 +130,14 @@ openvzDomainDefineCmd(virConnectPtr conn,
     } while (0)

     narg = 0;
+
+    /* lower priority for running tar and gzip */
+    ADD_ARG_LIT("nice");
+    ADD_ARG_LIT("-n");
+    ADD_ARG_LIT("19");
+    ADD_ARG_LIT("ionice");
+    ADD_ARG_LIT("-c3");
+
     ADD_ARG_LIT(VZCTL);
     ADD_ARG_LIT("--quiet");
     ADD_ARG_LIT("create");
-- 
1.5.3.4

-----
Yuji Nishida
nishidy at nict.go.jp




More information about the libvir-list mailing list