Skip to contentSkip to conversation

ts-xen-build-prep: Run the backgrounded resize2fs with ionice

PATCH In review Ian Jackson 2 participants 4 messages Jun 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ts-xen-build-prep: Run the backgrounded resize2fs with ionice

We wrap this in
ionice -cBest-Effort -n7

This is an attempt to stop resize2fs from starving builds of IO bandwidth. We have been seeing that some IO-intensive build steps (notably, configure) can take unreasonable amounts of time and we suspect resize2fs as the culprit.

---
 ts-xen-build-prep |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
ts-xen-build-prep +4 -1
index 0e68cd3..05a7857 100755
@@ -159,7 +159,10 @@ sub lvextend1 ($$$) {
     if (!$background) {
 	target_cmd_root($ho, $cmd, $timeout);
     } else {
-	target_cmd_root($ho, "$cmd >>resizefs.log 2>&1 </dev/null &", 30);
+	target_cmd_root($ho,
+			"ionice -cBest-Effort -n7 ".
+			"$cmd >>resizefs.log 2>&1 </dev/null &",
+			30);
     }
 }
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/3 ts-logs-capture: collect resize2fs.log

This is generated by ts-xen-build-prep but previously we didn't collect it.

---
 ts-logs-capture |    2 ++
 1 file changed, 2 insertions(+)
ts-logs-capture +2 -0
index 85baa52..db04336 100755
@@ -124,6 +124,8 @@ sub fetch_logs_host_guests () {
 
                   /var/log/xen-tools/*
 
+                  /root/resizefs.log
+
                   /boot/config*
 
                   /etc/xen/*
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/3 ts-logs-capture: collect /proc/partitions

In reply to Ian Jackson
---
 ts-logs-capture |    1 +
 1 file changed, 1 insertion(+)
ts-logs-capture +1 -0
index db04336..3ccfc00 100755
@@ -158,6 +158,7 @@ sub fetch_logs_host_guests () {
     'ps wwwaxf -eo pid,tty,stat,time,nice,psr,pcpu,pmem,nwchan,wchan:25,args',
          'lspci -vvv',
          'lspci -tv',
+         'cat /proc/partitions',
          ) {
             try_cmd_output_save($cmd);
         }
Signature · 1 line
1.7.10.4
Acked-by on v1 1/3
#3 lore raw
In reply to Ian Jackson

All three of these patches look good to me.

Quoted 29 lines · Ian Jackson

We wrap this in
ionice -cBest-Effort -n7

This is an attempt to stop resize2fs from starving builds of IO bandwidth. We have been seeing that some IO-intensive build steps (notably, configure) can take unreasonable amounts of time and we suspect resize2fs as the culprit.

---
 ts-xen-build-prep |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
ts-xen-build-prep +4 -1
index 0e68cd3..05a7857 100755
@@ -159,7 +159,10 @@ sub lvextend1 ($$$) {
     if (!$background) {
 	target_cmd_root($ho, $cmd, $timeout);
     } else {
-	target_cmd_root($ho, "$cmd >>resizefs.log 2>&1 </dev/null &", 30);
+	target_cmd_root($ho,
+			"ionice -cBest-Effort -n7 ".
+			"$cmd >>resizefs.log 2>&1 </dev/null &",
+			30);
     }
 }