Changeset: 44bdd3887aaf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/44bdd3887aaf
Modified Files:
monetdb5/optimizer/opt_mitosis.c
monetdb5/optimizer/opt_mitosis.h
monetdb5/optimizer/opt_reorder.c
Branch: Sep2022
Log Message:
Clean up define's.
diffs (57 lines):
diff --git a/monetdb5/optimizer/opt_mitosis.c b/monetdb5/optimizer/opt_mitosis.c
--- a/monetdb5/optimizer/opt_mitosis.c
+++ b/monetdb5/optimizer/opt_mitosis.c
@@ -11,6 +11,9 @@
#include "mal_interpreter.h"
#include "gdk_utils.h"
+#define MIN_SLIZE_SIZE 100000 /* minimal record count per partition */
+#define MAX_SLICES2THREADS_RATIO 4 /* There should be at most this
multiple more of slices then threads */
+
str
OPTmitosisImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci)
@@ -187,17 +190,17 @@ OPTmitosisImplementation(Client cntxt, M
* i.e., (threads*(rowcnt/pieces) <= m),
* i.e., (rowcnt/pieces <= m/threads),
* i.e., (pieces => rowcnt/(m/threads))
- * (assuming that (m > threads*MINPARTCNT)) */
+ * (assuming that (m > threads*MIN_SLIZE_SIZE)) */
/* the number of pieces affects SF-100, going beyond 8x
increases
* the optimizer costs beyond the execution time
*/
pieces = ((int) ceil((double)rowcnt / (m / threads)));
if (pieces <= threads)
pieces = threads;
- } else if (rowcnt > MINPARTCNT) {
+ } else if (rowcnt > MIN_SLIZE_SIZE) {
/* exploit parallelism, but ensure minimal partition size to
* limit overhead */
- pieces = MIN((int) ceil((double)rowcnt / MINPARTCNT), 4
* threads);
+ pieces = MIN((int) ceil((double)rowcnt /
MIN_SLIZE_SIZE), MAX_SLICES2THREADS_RATIO * threads);
}
}
diff --git a/monetdb5/optimizer/opt_mitosis.h b/monetdb5/optimizer/opt_mitosis.h
--- a/monetdb5/optimizer/opt_mitosis.h
+++ b/monetdb5/optimizer/opt_mitosis.h
@@ -12,7 +12,6 @@
#include "opt_support.h"
#define MAXSLICES 1024 /* to be refined */
-#define MINPARTCNT 100000 /* minimal record count per partition */
extern str OPTmitosisImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
diff --git a/monetdb5/optimizer/opt_reorder.c b/monetdb5/optimizer/opt_reorder.c
--- a/monetdb5/optimizer/opt_reorder.c
+++ b/monetdb5/optimizer/opt_reorder.c
@@ -32,6 +32,8 @@
#include "opt_mitosis.h"
+#define MAXSLICES 1024 /* to be refined */
+
/* Insert the instruction immediately after a previous instruction that
* generated an argument needed.
* If non can be found, add it to the end.
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]