89
学习 Druid(五):集群调优
source link: https://www.tuicool.com/articles/F7NnYzq
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
MiddleManager
TODO
Historical
堆内存
Historical 堆内存的使用:
- 部分未合并的 Segment 查询结果;
- Lookup 映射;
- 缓存。
堆内存公式:
(0.5GB * number of CPU cores) + (2 * total size of lookup maps) + druid.cache.sizeInBytes
配置项:
-
druid.cache.sizeInBytes
缓存大小。
堆外内存
Historical 堆外内存的使用:
- Processing buffer;
- GroupBy merging buffer。
堆外内存公式:
(druid.processing.numThreads + druid.processing.numMergeBuffers + 1) * druid.processing.buffer.sizeBytes
配置项:
-
druid.processing.buffer.sizeBytes
buffer 大小,合理的大小在 500MB 到 1GB 之间; -
druid.processing.numThreads
Processing 线程数,即可以处理的并发查询数; -
druid.processing.numMergeBuffers
GroupBy merging buffer 数,合理的大小约为druid.processing.numThreads
的四分之一。
Segment
配置项:
druid.server.maxSize druid.segmentCache.locations
通过优化 free system memory / druid.server.maxSize
比率,可以最大的利用内存中的 Segment 数据。
Broker
TODO
参考
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK