This query does not scale beyond 240 qps {"sql":"s...
# pinot-perf-tuning
p
This query does not scale beyond 240 qps {"sql":"select event_time , sum(count) as event_counts from nrt_app_open where year=year(now()) and month=month(now()) and day>=(day(now())-1) and FromDateTime(event_time, 'yyyy-MM-dd HHmmss') > cast((now() - 86400000) as long) group by 1 limit 1000000000","trace":false,"queryOptions":""} Any ideas on how I can optimise this. Cpu and memory of pinot-servers are also under utilized. Thanks in advance.
was able to scale it up to 420 qps by using TIMESTAMP indexing, I am using 10 servers but each of them are using less than 15 percent cpu and 20 percent memory of the given resources. How can I scale further, basically we want to test how much further we can go from here? similarly broker and controller are also under-utilised.
m
Can you check IO
p
Could you elaborate ?
m
If cpu is under utilized, and you are not able to scale beyond, then other bottlenecks are disk reads, network IO, memory read/writes. The next thing I’d check is what’s the disk IO happening, and if it is a lot, then moving to faster/local disk, playing with jvm args (heap, gc) might help
You can also check how much time is being spent in
FromDateTime(event_time, 'yyyy-MM-dd HH:mm:ss') > cast((now() - 86400000) as long)
. You can do so by comparing the latency of this query against the query where you manually compute and avoid the UDF (for testing purpose)
p
The query itself is taking only around 7-8 ms in the pinot-ui and it is now changed to
select event_time_epoch , sum(count) as event_counts from nrt_app_open_1 where event_time_epoch > cast((now() - 86400000) as long) group by 1 limit 1000000000
the earlier query was taking around 40ms in the ui. we are currently using gp2 storage class for persistance and for testing we are using a ec2 machine set up in the same VPC.
Meanwhile also, I have observed that when we fire load on pinot, the ui becomes very slow at times.