hi, i have created realtime table, it contains 134...
# troubleshooting
a
hi, i have created realtime table, it contains 134 coloumns and initially the kafka partition was 1 and the segment size we varying from 10Mb to 5Gb for document count between 50 to 5000, we are facing issue while quering and it taking huge resources for servers. currently we have increased kafka partition to 3 and segment size is now around 50Mb to 500Mb but still finds the document count is between 50 to 2000, can anybody suggest a solution. Also the segment flush is still based on 1h window and not exactly 200Mb per segments.
m
Just 5k docs causing 5GB size - there is something wrong with your setup. Can you share the index_map file and metadata.properties file that is inside the segment dir?
a
@Mayank, hi, i have dm the files (index_map and metadata.properties)
m
One issue I see is that you have
events
that is a large JSON and you have defined dictionary on it. Move it to no-dict column, that should help reduce the size.
👍 1
s
thanks for the response , will do that
one query I have, seems like pinot adds all the fields to dictionary column. Even timestamp fields which are high cardinle gets added to dictionary column . Do we need to explicitly add these timestamp columns to noDictionary column
m
What is the time granularity? And are you going to query in that fine granularity? If not, may be store in lower granularity
a
@Mayank, Thanks for helping us identify the segement bloat issue, after removing the index on events (json column) we saw a signficant change in per doc/record size, now its coming to 0.7 kb (no of docs is 2009 ,segment size is 1.51Mb) . But the issue is the segment size now is too less 1.5 MB . following is our table config json.
Copy code
"realtime.segment.flush.threshold.rows": "0",
"realtime.segment.flush.threshold.segment.size": "200M",
"realtime.segment.flush.threshold.time": "4h"
Please suggest us what should be the configuration so that the segment size is optimal ( around 200 mb ) . Also all our data currently is in realtime table ( coming from kafka ) . Any suggestion as to when should we move data from realtime to offline?
m
Incease this to 12h or 24h or more:
Copy code
"realtime.segment.flush.threshold.time": "4h"
You can also use merge/rollup task in the background.
👍 1
s
We are facing issues in querty time, a medium complex query takes 2-4 seconds. Currently our pinot ingestion rate is very less , its around 20 mb per day. size of the table itself is 600 mb . Also when i execute query from query console. the same query when executed continously , the query time increases eg, first run its 2000 ms , third run it becomes 4500 ms . The checked the query plan, documents scxan and all seems to be fine. Just wondering is it a issue with pinot configuration. Since the data footprint is small we have a lean configuration currently. Find below ou pinot broker , server configuartion
Broker jvmOpts: -XX:ActiveProcessorCount=2 -Xms256M -Xmx3G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-broker.log -Djute.maxbuffer=4000000 replicaCount: 2 resources: requests: cpu: "1" memory: "3Gi" limits: cpu: "1" memory: "3Gi" Controller jvmOpts: -XX:ActiveProcessorCount=2 -Xms256M -Xmx3G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-controller.log -Djute.maxbuffer=4000000 replicaCount: 1 resources: requests: cpu: "1" memory: "3Gi" limits: cpu: "1" memory: "3Gi" Server jvmOpts: -Xms512M -Xmx4G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-server.log -Djute.maxbuffer=4000000 replicaCount: 4 resources: requests: cpu: "1" memory: "4Gi" limits: cpu: "4" memory: "8Gi"
m
do you have query and the query response metadata? Also, always set xms = xmx
s
ok, will dm you the details