[译]InnoDB官方博客:InnoDB Plugin的性能和可伸缩性
本文内容遵从CC版权协议, 可以随意转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明网址: http://www.penglixun.com/tech/database/plug-in-for-performance-and-scalability.html 原文地址:http://blogs.innodb.com/wp/2009/03/plug-in-for-
本文内容遵从CC版权协议, 可以随意转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明网址: http://www.penglixun.com/tech/database/plug-in-for-performance-and-scalability.html
原文地址:http://blogs.innodb.com/wp/2009/03/plug-in-for-performance-and-scalability/
Why should you care about the latest “early adopter” release of the InnoDB Plugin, version 1.0.3? ? One word:?performance! The release introduces these features:
为什么你应该关注最近的InnoDB Plugin 1.0.3版?一个词:性能!这个版本包括了这些特性
- Enhanced concurrency & scalability: the “Google SMP patch” using atomic instructions for mutexing
- 增强的并发可可伸缩性:”Google 多处理机 补丁” 为Mutext锁操作使用原子操作
- More efficient memory allocation: ability to use more scalable platform memory allocator
- 更有效的内存分配:可以使用更多的可扩展内存 分配器(例如tcmalloc)
- Improved out-of-the-box scalability: unlimited concurrent thread execution by default
- 改进的即装即用扩展性:默认无限制的线程并发
- Dynamic tuning: at run-time, enable or disable insert buffering and adaptive hash indexing
- 动态优化调整:在运行时,打开或者关闭插入缓 存和自适应哈希索引
These new performance features can yield?up to twice the throughput or more, depending on your workload, platform and other tuning considerations. In another post, we explore some details about these changes, but first, what do these enhancements mean for performance and scalability?
这些新的性能特新可以提升多大两倍甚至更多的的吞吐量,这依赖于你的负载,平台和其他调整事项。在另一篇文章中,我们会探 讨这些改变的一些细节,但首先,我们现探讨这些性能和可扩展性的增强是什么意思,包括哪些内容
In brief, we’ve tested three different workloads (joins, DBT2 OLTP and a modified sysbench) using a memory-resident database. In all cases, the InnoDB Plugin scales significantly better than the built-in InnoDB in MySQL 5.1. And in some cases, the absolute level of performance is dramatically higher too! The charts below illustrate the kinds of performance gains we’ve measured with release 1.0.3 of the InnoDB Plugin. Your mileage may vary, of course. See the?InnoDB website for all the details on these tests.
总之,我们已经使用内存驻留数据库(所有数据都载入在内存中)测试了三种不同的工作负载(关联,DBT2 OLTP和修改过的sysbench)。在所有的情况下,InnoDB Plugin的伸缩性明显优于MySQL 5.1内置的InnoDB。在一些场景中,性能提升的水平高的惊人。下面的图说明了InnoDB Plugin 1.0.3的性能提升。你的测试结果可能不同,当然可以在InnoDB网站看到所有测试的细节。
This release of the InnoDB Plugin incorporates a?patch made by Ben Handy and Mark Callaghan at Google to improve multi-core scalability by using more efficient synchronization methods (mutexing and rw-locks) to reduce cpu utilization and contention. We’re grateful for this contribution, and you will be too!
这个InnoDB Plugin版本包含了Google的Ben Handy和Mark Callaghan的补丁来提升多处理机扩展性,包括使用了更有效的同步机制(Mutexing和RW-Locks)来减少CPU利用和竞争。我们非常感 谢这个补丁的贡献,相信你也是。
Now to our test results …
现在来看我们的测试结果…
Joins: The following chart shows the performance gains in performing joins, comparing the built-in InnoDB in MySQL (in?blue) with the InnoDB Plugin 1.0.3 (in?red).
关联:下图展示了执行Join操作时的性能提升,内置InnoDB(蓝)和InnoDB Plugin 1.0.3(红)的比较。
As you can see from the blue bars in the above chart, with MySQL 5.1 using the built-in InnoDB, the total number of joins the system can execute declines as the number of concurrent users increases. In contrast, the InnoDB Plugin slightly improves performance even with one user, and maintains performance as the number of users rises. This performance improvement is due in large part to the use of atomics for mutexing in the InnoDB Plugin.
正如你在上面蓝柱上看到的,MySQL 5.1的内置InnoDB,随着并发数的增加系统的执行速度反而下降了。与此相反,InnoDB Plugin随着并发的提升处理速度甚至略有提高,并且随着用户的增长保持着这种性能。这个性能改善很大程度上是因为对Mutexing使用了原子操作。
Transaction Processing (DBT2): The following chart illustrates a scalability improvement using the OLTP read/write DBT2 benchmark, again comparing the performance of?the built-in InnoDB in MySQL?with the performance of?InnoDB Plugin 1.0.3.
事务处理(DBT2):下入展示了用DBT2测试OLTP读写性能的提升,再次比较了内置InnoDB和InnoDB Plugin 1.0.3的性能。
Here, the InnoDB Plugin scales better than the built-in InnoDB from 16 to 32 users and produces about 12% more throughput with 64 concurrent users, as other bottlenecks are encountered or system capacity is reached. This improvement is likewise due primarily to the changes in mutexing.
这里,InnoDB Plugin伸缩性在16增加到32线程时表现更好,产生比64线程多大约12%的吞吐量。由于其他性能瓶颈或系统容量达到基线。这个提升依然主要依赖于 Mutexing的改变。
Modified Sysbench: This test uses a version of the well-known sysbench workload, modified to include queries based on a secondary index,?as suggested by Mark Callaghan of Google.
修改过的sysbench:这个测试使用了著名的sysbench,修改包括基于非主键索引的查询,由Google的 Mark Callaghan建议。
This time, the InnoDB Plugin shows significantly better scalability from 8 to 64 users than the built-in InnoDB in MySQL, yielding as much as 60% more throughput at 64 users. Like the previous examples, this improvement is largely due to the use of atomics for mutexing.
这次,InnoDB Plugin在8~64线程都展示了明显优于内置InnoDB的可伸缩性。在64并发时多大60%的性能提升!像前一个例子,这个提升依然主要靠 Mutexing的原子性。
Modified Sysbench with tcmalloc: This test uses the same modified sysbench workload, but shows the difference between the built-in InnoDB (which uses the internal InnoDB memory allocator) and the InnoDB Plugin when using a more scalable memory allocator, in this case?tcmalloc.
使用tcmalloc的修改过的sysbench:这种测试使用相同的sysbench场景,但是不同于内置InnoDB 的是InnoDB Plugin使用了tcmalloc作为内存分配器。
When the new configuration parameter?innodb_use_sys_malloc
is set to enable use of the memory allocator tcmalloc, the InnoDB Plugin really shines! Transaction throughput continues to scale, and the actual throughput with 64 users has nearly doubled!
当设置innodb_user_sys_malloc变量为tcmalloc作为内存分配器时,InnoDB Plugin依然是亮点!事务吞吐量继续扩展,在64并发时吞吐量提升接近1倍(相对没有tcmalloc的)。

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제









Windows 10 vs. Windows 11 성능 비교: 어느 것이 더 낫나요? 지속적인 기술 개발과 발전으로 운영 체제는 지속적으로 업데이트되고 업그레이드됩니다. 세계 최대 운영 체제 개발자 중 하나인 Microsoft의 Windows 운영 체제 시리즈는 항상 사용자로부터 많은 관심을 받아 왔습니다. 2021년에 Microsoft는 Windows 11 운영 체제를 출시하여 광범위한 논의와 관심을 불러일으켰습니다. 그렇다면 Windows 10과 Windows 11의 성능 차이는 무엇입니까?

Windows 운영 체제는 항상 개인용 컴퓨터에서 가장 널리 사용되는 운영 체제 중 하나였으며, Windows 10은 Microsoft가 새로운 Windows 11 시스템을 출시한 최근까지 오랫동안 Microsoft의 주력 운영 체제였습니다. Windows 11 시스템이 출시되면서 사람들은 Windows 10과 Windows 11 시스템 중 어느 것이 더 나은지에 관심을 가지게 되었습니다. 먼저 W부터 살펴보겠습니다.

모바일 인터넷 시대를 맞아 스마트폰은 국민의 일상생활에서 없어서는 안 될 존재가 되었습니다. 스마트폰의 성능은 사용자 경험의 질을 직접적으로 결정하는 경우가 많습니다. 스마트폰의 '두뇌'인 프로세서의 성능은 특히 중요합니다. 시장에서 Qualcomm Snapdragon 시리즈는 항상 강력한 성능, 안정성 및 신뢰성을 대표해 왔으며 최근 Huawei는 뛰어난 성능을 갖춘 것으로 알려진 자체 Kirin 8000 프로세서도 출시했습니다. 일반 사용자들에게는 강력한 성능의 휴대폰을 어떻게 선택하느냐가 중요한 이슈가 되었다. 오늘 우리는

Ollama는 Llama2, Mistral, Gemma와 같은 오픈 소스 모델을 로컬에서 쉽게 실행할 수 있는 매우 실용적인 도구입니다. 이번 글에서는 Ollama를 사용하여 텍스트를 벡터화하는 방법을 소개하겠습니다. Ollama를 로컬에 설치하지 않은 경우 이 문서를 읽을 수 있습니다. 이 기사에서는 nomic-embed-text[2] 모델을 사용합니다. 짧은 컨텍스트 및 긴 컨텍스트 작업에서 OpenAI text-embedding-ada-002 및 text-embedding-3-small보다 성능이 뛰어난 텍스트 인코더입니다. o를 성공적으로 설치한 후 nomic-embed-text 서비스를 시작하십시오.

PHP와 Go는 일반적으로 사용되는 두 가지 프로그래밍 언어이며 서로 다른 특성과 장점을 가지고 있습니다. 그 중 성능 차이는 모두가 일반적으로 우려하는 문제이다. 이 기사에서는 성능 관점에서 PHP와 Go 언어를 비교하고 구체적인 코드 예제를 통해 성능 차이를 보여줍니다. 먼저 PHP와 Go 언어의 기본 기능을 간략하게 소개하겠습니다. PHP는 원래 웹 개발을 위해 설계된 스크립팅 언어로, 배우기 쉽고 사용하기 쉬우며 웹 개발 분야에서 널리 사용됩니다. Go 언어는 Google에서 개발한 컴파일 언어입니다.

다양한 Java 프레임워크의 성능 비교: REST API 요청 처리: Vert.x가 최고이며 요청 속도는 SpringBoot의 2배, Dropwizard의 3배입니다. 데이터베이스 쿼리: SpringBoot의 HibernateORM은 Vert.x 및 Dropwizard의 ORM보다 우수합니다. 캐싱 작업: Vert.x의 Hazelcast 클라이언트는 SpringBoot 및 Dropwizard의 캐싱 메커니즘보다 우수합니다. 적합한 프레임워크: 애플리케이션 요구 사항에 따라 선택하세요. Vert.x는 고성능 웹 서비스에 적합하고, SpringBoot는 데이터 집약적 애플리케이션에 적합하며, Dropwizard는 마이크로서비스 아키텍처에 적합합니다.

PHP 배열 키 값 뒤집기 방법의 성능 비교는 array_flip() 함수가 대규모 배열(100만 개 이상의 요소)에서 for 루프보다 더 나은 성능을 발휘하고 시간이 덜 걸리는 것을 보여줍니다. 키 값을 수동으로 뒤집는 for 루프 방식은 상대적으로 시간이 오래 걸립니다.

C++ 프로그램 성능에 대한 함수의 영향에는 함수 호출 오버헤드, 로컬 변수 및 객체 할당 오버헤드가 포함됩니다. 함수 호출 오버헤드: 스택 프레임 할당, 매개변수 전송 및 제어 전송을 포함하며 이는 작은 함수에 상당한 영향을 미칩니다. 지역 변수 및 개체 할당 오버헤드: 지역 변수 또는 개체 생성 및 소멸이 많으면 스택 오버플로 및 성능 저하가 발생할 수 있습니다.
