DataIntellectTech/TorQ-Amazon-FinSpace-Starter-Pack

[RDB Scaling] Run queries against new rdb and old rdb and see metric impact

Opened this issue · 0 comments

Image

Image

The smaller rdb went pffline temporarily from memory breach during the testing process

queries run against each cluster were:

//first generate a bunch of quotes and check the CPU spike

{[dt]
 cnt:first 30000000 + 1?15000000;
 dts:`timestamp$dt;
 times:dts + asc cnt?("j"$`timestamp$1 + dt) - "j"$dts;
 syms:cnt?`MSFT`DOW`AAPL`IBM`INTC`GOOG`AMD`AIG`HPQ`DELL;
 bids:cnt?100.0;
 asks:cnt?100.0;
 bsizes:cnt?100;
 asizes:cnt?100;
 modes:cnt?"BITOZR ";
 exs:cnt?"NO";
 ([] time:times; sym:syms; bid:bids; ask:asks; bsize:bsizes; asize:asizes; mode:modes; ex:exs);
 } each 2015.10.10 + til 5



//then do something that would create objects to check memory
raze {[dt]
  cnt:first 2000000 + 1?30000;
  dts:`timestamp$dt;
  times:dts + asc cnt?("j"$`timestamp$1 + dt) - "j"$dts;
  syms:cnt?`MSFT`DOW`AAPL`IBM`INTC`GOOG`AMD`AIG`HPQ`DELL;
  prices:cnt?150.0;
  sizes:cnt?200;
  stops:cnt?0b;
  conds:cnt?"RNJG AT";
  exs:cnt?"NO";
  ([] time:times; sym:syms; price:prices; size:sizes; stop:stops; cond:conds; ex:exs)
  } each 2015.10.15 + til 3

//run some aggregations on some larger tables
select bsize wavg bid, asize wavg ask from {[dt]
 cnt:10000000;
 dts:`timestamp$dt;
 times:dts + asc cnt?("j"$`timestamp$1 + dt) - "j"$dts;
 syms:cnt?`MSFT`DOW`AAPL`IBM`INTC`GOOG`AMD`AIG`HPQ`DELL;
 bids:cnt?100.0;
 asks:cnt?100.0;
 bsizes:cnt?100;
 asizes:cnt?100;
 modes:cnt?"BITOZR ";
 exs:cnt?"NO";
 ([] time:times; sym:syms; bid:bids; ask:asks; bsize:bsizes; asize:asizes; mode:modes; ex:exs)
 } 2023.12.01

select bsize wavg bid, asize wavg ask from {[dt]
 cnt:100000000;
 dts:`timestamp$dt;
 times:dts + asc cnt?("j"$`timestamp$1 + dt) - "j"$dts;
 syms:cnt?`MSFT`DOW`AAPL`IBM`INTC`GOOG`AMD`AIG`HPQ`DELL;
 bids:cnt?100.0;
 asks:cnt?100.0;
 bsizes:cnt?100;
 asizes:cnt?100;
 modes:cnt?"BITOZR ";
 exs:cnt?"NO";
 ([] time:times; sym:syms; bid:bids; ask:asks; bsize:bsizes; asize:asizes; mode:modes; ex:exs)
 } 2023.12.01


// run some aggregations using grouping
select bsize wavg bid, asize wavg ask, h:max bid, l:min bid, o:first bid, c:last bid by sym, 0D01 xbar time from {[dt]
 cnt:100000000;
 dts:`timestamp$dt;
 times:dts + asc cnt?("j"$`timestamp$1 + dt) - "j"$dts;
 syms:cnt?`MSFT`DOW`AAPL`IBM`INTC`GOOG`AMD`AIG`HPQ`DELL;
 bids:cnt?100.0;
 asks:cnt?100.0;
 bsizes:cnt?100;
 asizes:cnt?100;
 modes:cnt?"BITOZR ";
 exs:cnt?"NO";
 ([] time:times; sym:syms; bid:bids; ask:asks; bsize:bsizes; asize:asizes; mode:modes; ex:exs)
 } 2023.12.01