|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 26/59] Use kops rather than mops
From: George Dunlap <george.dunlap@xxxxxxxxxx>
1 million operations on my test box takes about 3ms -- meaning the
minimum granularity for how long to burn cpu is far longer than
typical. Make this kops instead, giving us a minimum granularity of 3us.
Update most of the default workers to have similar patterns but on a
1/100 (nb not 1/1000) scale; with the exception of worker A (1/1000
scale) and the first worker in worker B (1/10 scale).
Also, actually fix the name of the scheduler in the README.
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
benchmark.go | 18 +++++++++---------
main.go | 16 ++++++++--------
run.go | 8 ++++----
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/benchmark.go b/benchmark.go
index 73c5441..ffecb82 100644
--- a/benchmark.go
+++ b/benchmark.go
@@ -39,7 +39,7 @@ func (wid WorkerId) String() (string) {
type WorkerReport struct {
Id WorkerId
Now int
- Mops int
+ Kops int
MaxDelta int
Cputime time.Duration
}
@@ -89,9 +89,9 @@ const (
func Throughput(lt int, lm int, t int, m int) (tput float64) {
time := float64(t - lt) / SEC
- mops := m - lm
+ kops := m - lm
- tput = float64(mops) / time
+ tput = float64(kops) / time
return
}
@@ -184,7 +184,7 @@ func (run *BenchmarkRun) Process() (err error) {
startTime int
startCputime time.Duration
lastTime int
- lastMops int
+ lastKops int
lastCputime time.Duration
}
@@ -225,7 +225,7 @@ func (run *BenchmarkRun) Process() (err error) {
d.startTime = e.Now
d.startCputime = e.Cputime
} else {
- tput := Throughput(d.lastTime, d.lastMops, e.Now,
e.Mops)
+ tput := Throughput(d.lastTime, d.lastKops, e.Now,
e.Kops)
util := Utilization(d.lastTime, d.lastCputime, e.Now,
e.Cputime)
s.MinMaxTput.Update(tput)
@@ -234,7 +234,7 @@ func (run *BenchmarkRun) Process() (err error) {
ws.MinMaxUtil.Update(util)
}
d.lastTime = e.Now
- d.lastMops = e.Mops
+ d.lastKops = e.Kops
d.lastCputime = e.Cputime
}
@@ -242,11 +242,11 @@ func (run *BenchmarkRun) Process() (err error) {
ws := &run.Results.Summary[Id.Set]
s := &ws.Workers[Id.Id]
- s.TotalTput = d.lastMops
+ s.TotalTput = d.lastKops
s.TotalTime = time.Duration(d.lastTime - d.startTime)
s.TotalCputime = d.lastCputime - d.startCputime
- s.AvgTput = Throughput(d.startTime, 0, d.lastTime, d.lastMops)
+ s.AvgTput = Throughput(d.startTime, 0, d.lastTime, d.lastKops)
s.AvgUtil = Utilization(d.startTime, d.startCputime,
d.lastTime, d.lastCputime)
ws.MinMaxAvgTput.Update(s.AvgTput)
@@ -345,7 +345,7 @@ func (run *BenchmarkRun) TextReport(level int) (err error) {
for _, e := range s.Raw {
time := float64(e.Now) / SEC
fmt.Printf (" [%8.3f] %8.3f
%8d %12d\n", time,
- e.Cputime.Seconds(),
e.Mops, e.MaxDelta)
+ e.Cputime.Seconds(),
e.Kops, e.MaxDelta)
}
}
diff --git a/main.go b/main.go
index 61d3949..6eaa39e 100644
--- a/main.go
+++ b/main.go
@@ -29,15 +29,15 @@ func main() {
switch(os.Args[1]) {
case "plan":
- workerA := []string{"burnwait", "1", "20000000"}
+ workerA := []string{"burnwait", "7", "20000"}
//workerB := []string{"burnwait", "10", "20000000"}
- workerB := []string{"burnwait", "1", "30000000",
- "burnwait", "2", "30000000",
- "burnwait", "1", "30000000",
- "burnwait", "1", "30000000",
- "burnwait", "1", "30000000",
- "burnwait", "1", "30000000",
- "burnwait", "3", "30000000",
+ workerB := []string{"burnwait", "100", "3000000",
+ "burnwait", "20", "300000",
+ "burnwait", "10", "300000",
+ "burnwait", "10", "300000",
+ "burnwait", "10", "300000",
+ "burnwait", "10", "300000",
+ "burnwait", "30", "300000",
}
diff --git a/run.go b/run.go
index 259f427..ed1957b 100644
--- a/run.go
+++ b/run.go
@@ -41,15 +41,15 @@ func Report(ws *WorkerState, r WorkerReport) {
if (lr.Now > 0) {
time := float64(r.Now) / SEC
dtime := float64(r.Now - lr.Now) / SEC
- mops := r.Mops - lr.Mops
+ kops := r.Kops - lr.Kops
- tput := Throughput(lr.Now, lr.Mops, r.Now, r.Mops)
+ tput := Throughput(lr.Now, lr.Kops, r.Now, r.Kops)
util := Utilization(lr.Now, lr.Cputime, r.Now, r.Cputime)
- fmt.Printf("%v %8.3f [%8.3f] cpu %8.3f [%8.3f] Mops: %8d [%8d]
Tput: %4.2f Util: %4.2f\n",
+ fmt.Printf("%v %8.3f [%8.3f] cpu %8.3f [%8.3f] Kops: %8d [%8d]
Tput: %4.2f Util: %4.2f\n",
r.Id, time, dtime, r.Cputime.Seconds(),
r.Cputime.Seconds() - lr.Cputime.Seconds(),
- r.Mops, mops, tput, util);
+ r.Kops, kops, tput, util);
}
ws.LastReport = r
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |