Hi, When we are running a query individually we ar...
# troubleshooting
p
Hi, When we are running a query individually we are seeing latencies of the order of 3seconds but when we run for example same query parallely we are seeing latencies to be order of 7-10secs for the third query. Do the queries run serially? I have one broker and 2 servers as part of my setup, also would adding more servers be helpful in parallelizing better for optimizing query latencies?
m
This can be due to a few factors such as GC, or resource contention (if you have too many segments). If GC, then tuning the memory param will help. If resource contention, perhaps you need to add more servers.
p
Is there a easy way to figure out which one is the issue? we do have order of ~3000 segments and of which 1200 are getting queried for my query. I am leaning towards resource contention..
resource contention you mean disk/memory/cpu usage?
k
do you know where is the 3 seconds spent
m
How many cores do your VMs have? I think the default setting is to use 2x num cores as threads. Each thread processes one segment at a time. So if you have too many small segments (and too few cores), the could explain the behavior your are seeing.
But yes, if you can find out where the 3second is spent, that will take the guess work out
p
Processed requestId=1500,table=tablename_REALTIME,segments(queried/processed/matched/consuming)=1747/634/107/4,schedulerWaitMs=0,reqDeserMs=1,totalExecMs=6384,re sSerMs=0,totalTimeMs=6385,minConsumingFreshnessMs=1597089806427,broker=Broker_172.31.19.195_8099,numDocsScanned=662,scanInFilter=269063096,scanPostFilter=662,sc hed=fcfs For example from one of the servers
I guess increase the segment size and number of cores to improve query time. Is the above log helpful (it’s from one of the servers)
k
scanInFilter=269063096
you need to add inv index on columns in the query
p
ah okay, that’s helpful
let me try that
thanks
m
Yeah, that will help reduce the first query's latency
p
I guess increase the number of cores to increase the parallel query perf. W.r.t Segment size ideally we want a larger segment size (so overall segments are lower) for better query perf rite? I see query latency going down, with scanin row count going down (post enabling inverted index) Thanks