From 89c04c2d73455ac1396c4e432657d1edccc1f154 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Mon, 14 Jun 2010 16:16:30 +0100 Subject: [PATCH] Add example gnt-debug submit-job json files These files are being used to test the job queue performance with various changes and conditions. Adding them here for posterity. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- Makefile.am | 3 +++ doc/examples/gnt-debug/README | 21 +++++++++++++++++++++ doc/examples/gnt-debug/delay0.json | 3 +++ doc/examples/gnt-debug/delay50.json | 3 +++ 4 files changed, 30 insertions(+) create mode 100644 doc/examples/gnt-debug/README create mode 100644 doc/examples/gnt-debug/delay0.json create mode 100644 doc/examples/gnt-debug/delay50.json diff --git a/Makefile.am b/Makefile.am index 268436cae..af6fd9361 100644 --- a/Makefile.am +++ b/Makefile.am @@ -289,6 +289,9 @@ EXTRA_DIST = \ doc/examples/ganeti.default-debug \ doc/examples/hooks/ethers \ doc/examples/hooks/ipsec.in \ + doc/examples/gnt-debug/README \ + doc/examples/gnt-debug/delay0.json \ + doc/examples/gnt-debug/delay50.json \ test/testutils.py \ test/mocks.py \ $(dist_TESTS) \ diff --git a/doc/examples/gnt-debug/README b/doc/examples/gnt-debug/README new file mode 100644 index 000000000..cc8ebf99a --- /dev/null +++ b/doc/examples/gnt-debug/README @@ -0,0 +1,21 @@ +In order to submit arbitrary jobs to ganeti one can call gnt-debug submit-job +passing a suitably formatted json file. A few examples of those files are +included here. + +Using delay0.json and delay50.json in conjunction with submit-job for example +allows one to submit rapidly many short delay job (using --job-repeat), +repeating the sleep opcode any number of times (using --op-repeat), either all +at the same time or one at a time (with --each). This can be used to check the +performance of the job queue. + +Examples: + +# Run 40 jobs with 10 opcodes each: +gnt-debug submit-job --op-repeat 10 --job-repeat 40 --timing-stats delay0.json + +# Run 40 jobs with 1 opcode each: +gnt-debug submit-job --op-repeat 1 --job-repeat 40 --timing-stats delay0.json + +# Run 40 jobs with 10 opcodes each and submit one at a time: +gnt-debug submit-job --op-repeat 10 --job-repeat 40 --timing-stats --each delay0.json + diff --git a/doc/examples/gnt-debug/delay0.json b/doc/examples/gnt-debug/delay0.json new file mode 100644 index 000000000..39ade92b4 --- /dev/null +++ b/doc/examples/gnt-debug/delay0.json @@ -0,0 +1,3 @@ +[ +{"OP_ID": "OP_TEST_DELAY", "debug_level": 0, "dry_run": false, "duration": 0.0, "on_master": true, "on_nodes": []} +] diff --git a/doc/examples/gnt-debug/delay50.json b/doc/examples/gnt-debug/delay50.json new file mode 100644 index 000000000..6fce0c345 --- /dev/null +++ b/doc/examples/gnt-debug/delay50.json @@ -0,0 +1,3 @@ +[ +{"OP_ID": "OP_TEST_DELAY", "debug_level": 0, "dry_run": false, "duration": 0.05, "on_master": true, "on_nodes": []} +] -- GitLab