[Swift-commit] r3631 - in SwiftApps/SwiftR: . Swift/exec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Sep 20 11:37:35 CDT 2010


Author: wilde
Date: 2010-09-20 11:37:35 -0500 (Mon, 20 Sep 2010)
New Revision: 3631

Modified:
   SwiftApps/SwiftR/Swift/exec/start-swift-workers
   SwiftApps/SwiftR/TODO
   SwiftApps/SwiftR/UserGuide
Log:
Improve and correct cleanup: all services should now shut down when start command is terminated. start-swift-workers no starts the Swift R service.

Modified: SwiftApps/SwiftR/Swift/exec/start-swift-workers
===================================================================
--- SwiftApps/SwiftR/Swift/exec/start-swift-workers	2010-09-17 21:28:58 UTC (rev 3630)
+++ SwiftApps/SwiftR/Swift/exec/start-swift-workers	2010-09-20 16:37:35 UTC (rev 3631)
@@ -31,6 +31,7 @@
 
   IDLETIMEOUT=$((60*60*240)) # 10 days: FIXME: make this a command line arg
 
+  rm -rf remotepid.* # FIXME: should not be needed if we start in a new dir each time
   for host in $(echo $COMPUTEHOSTS); do
     timestamp=$(date "+%Y.%m%d.%H%M%S")
     random=$(awk "BEGIN {printf \"%0.5d\", $RANDOM}")
@@ -106,16 +107,16 @@
   trap - $TRAPS
   sshpids=$(cat $sshpidfile)
   echo "Terminating worker processes $sshpids, starter $starterpid, and coaster-service pid $coasterservicepid"
-  if [ "_$sshpids$starterpid$coasterservicepid" != _ ]; then
-    echo kill $sshpids $starterpid $coasterservicepid >& /dev/null
-  fi
   for rpfile in $(ls -1 remotepid.*); do
     rpid=$(grep PID= $rpfile | sed -e 's/PID=//')
     rhost=$(echo $rpfile | sed -e 's/remotepid.//')
     echo from $rpfile: doing ssh $rhost kill $rpid
-    ssh $rhost kill $rpid
+    ssh $rhost kill -s TERM -- '-$(' ps -p $rpid -o pgid --no-headers ')'
   done
-  kill 0 # Kill 
+  if [ "_$sshpids$starterpid$coasterservicepid" != _ ]; then
+    echo kill $sshpids $starterpid $coasterservicepid >& /dev/null
+  fi
+  kill 0 # Kill # FIXME: what was this for????
 }
 
 trap onexit $TRAPS
@@ -123,8 +124,10 @@
 wait-and-start-workers &
 starterpid=$!
 
-$SWIFTBIN/swift -config cf -tc.file tc -sites.file sites.xml passivate.swift 2>&1 | tee $out
+$SWIFTBIN/swift -config cf -tc.file tc -sites.file sites.xml passivate.swift 2>&1 </dev/null | tee $out
 
 echo "==> Service started and set to passive mode. Use ^C to terminate all services and workers."
 
+$SWIFTRBIN/start-swift-Rserver service
+
 wait

Modified: SwiftApps/SwiftR/TODO
===================================================================
--- SwiftApps/SwiftR/TODO	2010-09-17 21:28:58 UTC (rev 3630)
+++ SwiftApps/SwiftR/TODO	2010-09-20 16:37:35 UTC (rev 3631)
@@ -20,10 +20,17 @@
 
 -----
 
+  find why TestSwift is faster with local internal coaster service (13 secs) than with external service (19 seconds)
+  If thats true, maybe use local internal ervice for local exec if possible.
 
+  Ensure that shell startup overhead is not impacting swiftapply() latency
 
+  Do R functions to start stop list and manage service processes, both ocal and remote
 
+  Get traces into R vars of swiftapply performance
 
+
+
 See if swift can write to pipe without using an app()
 
 Bundle start-swift-workers and RunRServer into one command;

Modified: SwiftApps/SwiftR/UserGuide
===================================================================
--- SwiftApps/SwiftR/UserGuide	2010-09-17 21:28:58 UTC (rev 3630)
+++ SwiftApps/SwiftR/UserGuide	2010-09-20 16:37:35 UTC (rev 3631)
@@ -37,6 +37,7 @@
 # do this outside of R
 
 SWIFT=<your package install dir>/Swift
+$SWIFT/exec/start-swift-workers hostname
 $SWIFT/exec/start-swift-server 
 
 HELLO WORLD TEST




More information about the Swift-commit mailing list