"partitionsSpec": {
"targetPartitionSize": 1000000
},
"updaterJobSpec": {
java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -classpath lib/*:config/broker com.metamx.druid.http.BrokerMain
java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -classpath lib/*:config/master com.metamx.druid.http.MasterMain
java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -classpath lib/*:config/compute com.metamx.druid.http.ComputeMain
{
"queryType": "groupBy",
"dataSource": "test_data",
"granularity": "all",
"dimensions": [],
"aggregations": [{"type": "longSum", "fieldName": "event_count", "name": "events"},
{"type": "count", "name": "rows"}],
"intervals": ["2013-06-01T00:00/2013-07-01T00"]
}
Latencies described below:
Using broker node 1st attempt: 37sec
Using broker node 2nd attempt (to see how caching improves it): 37 sec - Seems no caching in case of groupBy queries as evident from previous posts as well
Using compute node : 37sec
When I change the query to a timeseries query with the same aggregations:
{
"queryType": "timeseries",
"dataSource": "test_data",
"granularity": "all",
"aggregations": [{"type": "longSum", "fieldName": "event_count", "name": "events"},
{"type": "count", "name": "rows"}],
"intervals": ["2013-06-01T00:00/2013-07-01T00"]
}
Using broker node 1st attempt : 15.38sec
Using broker node 2nd attempt : 15.36sec
Using compute node : 15.42sec
When I further change the query without any longSum aggregations (as suggested in one of the previous posts)
{
"queryType": "timeseries",
"dataSource": "test_data",
"granularity": "all",
"aggregations": [
{"type": "count", "name": "rows"}],
"intervals": ["2013-06-01T00:00/2013-07-01T00"]
}
This module contains query processing functionality.
| Property | Description | Default |
|---|---|---|
druid.processing.buffer.sizeBytes | This specifies a buffer size for the storage of intermediate results. The computation engine in both the Historical and Realtime nodes will use a scratch buffer of this size to do all of their intermediate computations off-heap. Larger values allow for more aggregations in a single pass over the data while smaller values can require more passes depending on the query that is being executed. | 1073741824 (1GB) |
druid.processing.formatString | Realtime and historical nodes use this format string to name their processing threads. | processing-%s |
druid.processing.numThreads | The number of processing threads to have available for parallel processing of segments. Our rule of thumb is num_cores - 1, this means that even under heavy load there will still be one core available to do background tasks like talking with ZK and pulling down segments. | 1 |
druid.processing.buffer.sizeBytes=2000000000 //which is roughly 2G
druid.processing.numThreads=2
Launching the compute node with -Xmx6G
Also, I would like to bring to your notice that the parameter "druid.processing.buffer.sizeBytes" is being read as an integer in Druid Compute Node code which causes a NumberFormatException when a value > 2000000000 is specified. I guess this is a bug where this should have been read in a bigger sized data type.
After tuning all of the above parameters, here is a look at the query times:
Query
{
"queryType": "timeseries",
"dataSource": "test_data",
"granularity": "all",
"aggregations": [
{"type": "count", "name": "rows"}],
"intervals": ["2013-06-01T00:00/2013-07-01T00"]
}
Thanks for helping in locating the tuneable configurations to improve query performance. It indeed resulted in improved query times but even after specifying the optimal configurations (as far as I understand) , the query latency is still on the higher side and I am suspicious of this being not able to scale for larger amounts of data.Just to give you a rough idea, a month's data of ours is currently occupying around 20G of segment size with around 300 million records been ingested with around 32 dimensions and 3-4 aggregations.Just to re-iterate , each compute node is of the following configuration : dual core 1.2 Ghz processor, 7.5G of memory and 840G of disk space
We are using the following relevant properties in compute node config:druid.processing.buffer.sizeBytes=2000000000 //which is roughly 2G
druid.processing.numThreads=2
Launching the compute node with -Xmx6G
Also, I would like to bring to your notice that the parameter "druid.processing.buffer.sizeBytes" is being read as an integer in Druid Compute Node code which causes a NumberFormatException when a value > 2000000000 is specified. I guess this is a bug where this should have been read in a bigger sized data type.
After tuning all of the above parameters, here is a look at the query times:
Query
{
"queryType": "timeseries",
"dataSource": "test_data",
"granularity": "all",
"aggregations": [
{"type": "count", "name": "rows"}],
"intervals": ["2013-06-01T00:00/2013-07-01T00"]
}Time taken - 3.5 - 4 sec
Also, the query time seems to decrease linearly with the amount of data being queried for. It becomes 1.5-2 sec for data range for 15 days.
Analysing the above, it seems that if we have more data points coming in a month in future or queries elapsing more than a month's time, the query latencies are going to degrade further.We are looking forward to around 8X more data as compared to this being queried in the future. We intend to achieve sub-second latencies for the same.
Can you please suggest what other changes we should be making in our system in order to scale Druid to our requirements. It will be great if you can let us know if these are the expected query times and what kinds of data loads are you guys having on the Druid cluster with tolerable query latencies.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-development/98275a56-c710-45a6-947c-6e8763b1724d%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Druid Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-developm...@googlegroups.com.
To post to this group, send email to druid-de...@googlegroups.com.
Eric,Abhishek and I are part of the same team - thanks for your input! Couple of follow up queries:
- The current stack is on Cassandra and the reason to try out Druid is for the interactive drill-down queries ( slice-dice ). Looking at the projected numbers, we need to plan to scale it to support ~20TB of data. From your response, I'm a bit unclear around the overall cluster memory requirements - Does Druid expects all the data to be in memory? If not, how can one estimate the total memory requirement ( irrespective of # compute nodes and assuming RF=1 )?
- We are on EC2 - any recommendation of the class of node? Based on http://druid.io/docs/0.6.10/Cluster-setup.html , it is recommended that compute node have as many cores as possible and good memory. c1.xlarge ( 7GB RAM / 8 cores / 1.7TB disk ) seems like a good fit ( cores/$ ). Since max cores in any EC2 instance is 8, the other possible candidate is m3.2xlarge ( 30GB RAM / 8 cores / EBS )
- From one of your earlier points, the overall node memory requirement = HEAP size + (number of cores - 1 * buffer.sizeBytes ). Using this, is this a good correct way to look at the configs:
- If c1.xlarge ( 7GB RAM ), then 4GB heap + ( 7 x 300MB ) = 6.1 GB
- If m3.2xlarge ( 30GB RAM ), then 8GB heap + ( 7 X 2GB ) = 22 GB
- As mentioned in the previous thread, druid.server.maxsize is set as 1 TB - does the property tuning just depends upon the total disk space OR also on the node's memory?
- "Metamarkets cluster: 20~30TB of segments on ~40 machines with 95th percentile query latencies under 1 second" - So looks like ~750GB/node. Could you share the machine specs, JVM params and relevant druid tuning configs?
We are excited about Druid and already ran multiple POCs to confirm that Druid indeed solves our feature requirements. The only blocker for us to go ahead with Druid is to understand the scale implication - sub second interactive queries over 20TB of data ( groupBy queries, 1-2 dimensions, 2-4 filters with occasional orderBy+limit )