Skip to Content
Trino 权威指南:原书第2版
book

Trino 权威指南:原书第2版

by Matt Fuller, Manfred Moser, Martin Traverso
July 2023
Intermediate to advanced
278 pages
5h 40m
Chinese
China Machine Press
Content preview from Trino 权威指南:原书第2版
生产环境中的
Trino
|
247
splits-per-node
属性的值。它确保在工作节点处理任务的同时,等待的任务可以被放
入队列中。
12.6
网络数据交换
网络配置和设置以及与数据源的距离也是影响
Trino
集群性能的重要因素。
Trino
支持一
些网络特定的属性,使你可以修改默认值并匹配特定的使用场景。
除了提高性能以外,有时还需要调优一些其他的网络相关问题,以使查询运行良好。下
面将讨论一些可以调优的常见属性。
12.6.1
并发性
Trino
的数据交换客户端负责请求上游任务产生的数据,它使用的默认线程数是
25
。你
可以通过设置
exchange.client-threads
属性来修改这个值。
使用更多的线程可以提高大规模和高并发配置集群的性能。这是因为在这些集群中,产
生数据的速度更快,提高用于消费数据的并发性可以降低时延。相反,使用更多的线程
也会需要更多的内存。
12.6.2
缓冲区大小
在数据交换时,发送方和接收方会将收发的数据放在缓冲区中。发送方和接收方的缓冲
区大小可以分别配置。
在发送方,任务将产生的数据写入缓冲区并等待下游的数据交换客户端进行请求。默认
的缓冲区大小是
32MB
,这可以通过
sink.max-buffer-size
属性调整。提高这个值可
能有助于提高大规模集群的吞吐量。
在接收方,在下游任务处理数据前,数据先放置在缓冲区中。这个缓冲区的默认大小也
32MB
且可以通过
exchange.max-buffer-size
属性进行调整。设置较大的接收缓冲
区可以从网络上获取更多数据来延缓背压的发生,从而提高查询性能,特别是大规模集 ...
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

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
Three Essentials for Agentic AI Security

Three Essentials for Agentic AI Security

Paolo Dal Cin, Daniel Kendzior, Yusof Seedat, Renato Marinho
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9787111731603