Changeset: a5fb581df77a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a5fb581df77a Modified Files: monetdb5/scheduler/Tests/query00.mal Branch: mutation Log Message:
Scripting This little script illustrates the limited parallelism obtained with larger scans. diffs (92 lines): diff --git a/monetdb5/scheduler/Tests/query00.mal b/monetdb5/scheduler/Tests/query00.mal --- a/monetdb5/scheduler/Tests/query00.mal +++ b/monetdb5/scheduler/Tests/query00.mal @@ -1,7 +1,7 @@ -# example framework for a multicore based execution stack -# illustrate how it would appear after an optimizer call. +# example framework to obtain insight in behavior of +# a single MAL primitive -function initialize{unsafe}():bat[:oid,:lng]; +function initialize{unsafe}(limit:lng):bat[:oid,:lng]; b:= bat.new(:oid,:lng); r:= mmath.srand(0); @@ -9,58 +9,38 @@ function initialize{unsafe}():bat[:oid,: k:= mmath.rand(); l:= calc.lng(k); bat.append(b,l); - redo i:= iterator.next(1:lng,1000000:lng); + redo i:= iterator.next(1:lng,limit); exit i; return b; end initialize; -function query(run:int, b:bat[:oid,:lng]); +function query(b:bat[:oid,:lng]):lng; t0:= alarm.usec(); - barrier z:= language.dataflow(); s1 := algebra.subselect(b,1:lng,99:lng,true,false,false); - #s2 := algebra.subselect(b,1:lng,999:lng,true,false,false); - #s3 := algebra.subselect(b,1:lng,9999:lng, true,false,false); exit z; - t1:= alarm.usec(); - t2 := t1-t0; - io.printf("#run %d %d\n",run,t2); - + return query := t1-t0; end query; optimizer.multicore("user","query"); -function testrun(); - b:= initialize(); +function testrun(limit:lng); + t0:= alarm.usec(); + b:= initialize(limit); bat.setReadMode(b); - profiler.activate("ISTestmrw"); - profiler.setAll(); - profiler.openStream(); - profiler.start(); + t1:= alarm.usec(); + t1:= t1-t0; - user.query(0,b); - user.query(1,b); - user.query(2,b); - user.query(3,b); - user.query(4,b); - user.query(5,b); - user.query(6,b); - user.query(7,b); - user.query(8,b); - user.query(9,b); - user.query(10,b); - user.query(11,b); - user.query(12,b); - user.query(13,b); - user.query(14,b); - user.query(15,b); - user.query(16,b); - user.query(17,b); - user.query(18,b); - user.query(19,b); - user.query(20,b); +barrier step:=0; + t2:= user.query(b); + io.printf("#run %d %d %d\n",step,limit,t2); + redo step:= iterator.next(1,16); +exit step; +end testrun; - profiler.stop(); -end testrun; -testrun(); +# runs based on sizes +testrun(100000:lng); #400K +testrun(1000000:lng); #4MB +testrun(10000000:lng); #40MB +testrun(100000000:lng); #400MB _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list