Skip to Content
Presto实战
book

Presto实战

by Matt Fuller, Manfred Moser, Martin Traverso
March 2021
Intermediate to advanced
265 pages
6h 50m
Chinese
Posts & Telecom Press
Content preview from Presto实战
226
12
许有数据倾斜的情况下,一个节点最多可以消耗平均内存的两倍。内存消耗量这样的数字
根据数据组织的方式和常见查询的类型(也就是集群的工作负载)的不同,会产生显著的
变化。此外,集群的基础设施,如机器的大小和数量,也对配置选择有巨大的影响。
为了防止死锁,你可以设置
query.low-memory-killer.policy
属性。可选的值是
total-
reservation
total-reservation-on-blocked-nodes
。选用
total-reservation
时,
Presto
会终结集群中占用内存最多的查询,从而释放资源。另外,选用
total-reservation-on-
blocked-nodes
时,系统会终止在阻塞的节点上使用最多内存的查询。
从例子中可以看出,你可以先根据一些假设条件开始设定参数,然后再根据实际的工作负
载进行调整。
例如,为可视化工具上的交互式
ad-hoc
查询所准备的集群
,可能需要执行大量小规模的查
询。随着用户数量的增多,查询数量和并发性都会上升。通常情况下,并不需要更改内存
配置,只需要为集群添加工作节点即可。
然而,当同一个集群接入一个拥有海量数据的数据源并在上面执行复杂查询时,这些查询
就很可能会超出资源的使用限制。此时,你就必须要调整内存配置了。
这将引入另一个值得一提的点。作为最佳实践,通常
Presto
集群应该具有完全相同的工作
节点,而所有的工作节点都应具有相同的虚拟机(
VM
)镜像
、容器大小,以及相同的硬
件规格。因此,更改工作节点上的内存通常意味着,新值对于物理内存来说太大或太小 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

大数据项目管理:从规划到实现

大数据项目管理:从规划到实现

Ted Malaska, Jonathan Seidman
机器学习流水线实战

机器学习流水线实战

Hannes Hapke, Catherine Nelson

Publisher Resources

ISBN: 9787115560056