国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

首頁(yè) 資料庫(kù) mysql教程 MySQL Enterprise Backup Improved Compression Algorithm for 3_MySQL

MySQL Enterprise Backup Improved Compression Algorithm for 3_MySQL

Jun 01, 2016 pm 01:13 PM

Background:

Prior to version 3.10, MySQL Enterprise Backup (MEB) used zlib compression for in-memory compression of datafiles. The compression worked by splitting the innodb datafiles into fixed size blocks and compressing each block independently.After searching on the web we found there are many compression algorithms available which can be used for compression. This triggered the idea of testing the performance of available compression algorithms. If the benchmark shows improved performance we can make backup and/or restore faster by adding the new compression algorithm to MEB.

Implementation :

The idea to implement the algorithms procceded as follows .

1. Select a "long list" of algorithms based on literature and what Google and other databases are using.
2. Create a prototype of MEB supporting the algorithms in the long list.
3. Run comparison tests of algorithms with the MEB prototype.
4. Select a "short list" of algorithms that will be added to MEB 3.10.

Criteria for Selecting the Algorithm:

The following criteria were used in comparing compression algorithms.

1. Compression speed
2. Decompression speed
3. Compression ratio
4. CPU-usage
5. Licensing model

These criteria have a differing importance. Compression speed, and compression ratio are probably more important to most users than decompression speed.

Performance Test:

We have now completed the performance tests of the new compression algorithms for MEB. See the below table for the list of compression algorithms were evaluated in the test.

Machine and OS Configurations:

OS : Oracle Linux 6 (x86_64)
Memory: 29 GB RAM
Cpu : 8 vCPUs (2 quad-core processors, no HT)
Read speed of the source dir(data directory) : 600 MB/s
Write speed of the destination dir(backup directory) : 300 MB/s

A backup of a 441 GB database was generated using TPC-H datagen tool taken when the mysqld process was not running .

Compression Algorithms Time [min] Compr. size [GB] Compr. / Orig. size Avg. CPU usage Avg. CPU Idle Reads [MB/s] Writes [MB/s] Source Disk busy
uncompressed/Normal Backup to Directory 31 N/A 100% 20% 65% 250 250 100%
Zlib (level=1) 34 165 37% 82% 15% 220 90 70%
Zlib (level=9) 720 120 27% - - - - -
LZF 27 222 50% 45% 50% 270 140 100%
LZO 27 224 51% 40% 55% 270 140 100%
Snappy 31 221 50% 55% 40% 260 130 80%
QuickLZ 26 203 46% 35% 55% 280 120 100%
LZ4 26 215 49% 35% 55% 280 130 100%
LZMA (level=1) 90 110 25% 78% 20% 80 22 25%
LZMA (level=9) 360 88 20% - - - - -

Few Important Notes:

? Some columns are blanks because the test ran for longer duration of time so it was not feasible to collect monitoring stats.

“Source Disk busy" is the number of I/O per second in percent of what the device can execute. It is not related to the device throughput (MB/s).

MEB has an internal work queue to process data that is managed by separate read, process, and write threads. Read threads will place data in the process queue where processing threads then process it, and finally after the processing is complete, the data will be placed in the write queue where they will be written out to storage. Due to this design, if writes are slower than reads (which they often are), then the reads will effectively be throttled by the write speeds (write speeds typically being the limiting factor).

Analysis of the Compression Test's:

LZ4 and QuickLZ were the fastest algorithms, while ZLib (level=9) was by far the slowest. For compression ratios, LZMA (level=9) was only able to reach 20%, whereas QuickLZ reached 46%, and LZ4 49%. This illustrates the fact that there is a trade-off between backup speed and the reduction in data size. Nevertheless, we could say that algorithm A is better than algorithm B, if A is faster than B and produces a backup which is not larger than that of B, or if A produces a smaller backup than B and A is not slower than B. Using this criteria we can say that QuickLZ is a better compression algorithm than LZ4, Snappy, LZO, or LZF. Similarly, LZMA (level=1) is superior to Zlib (level=9). ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??????????? The summary table shows two limiting factors for the backup speed. The IO speed of the of disk on which the database resides (the source disk) is thelimiting factor for uncompressed backup and compressed backups made with LZF, LZO,QuickLZ and LZ4. For Zlib (level=1), Snappy and LZMA (level=1) the limiting factor is the CPU. After removing the worst performing algorithms, we have four remaining that we can organize into a line where you get higher speeds as you move to the left, and better compression as you move to the right.

BEST SPEED --- QuickLZ --LZ4------ Zlib (lev.=1) ---- LZMA (lev.=1)---- LZMA(lev=9) --- BEST COMPRESSION

Restore Speed:

The restore speed was almost the same for all the algorithms. The restore of uncompressed backup and ZLib compressed backup took 28 minutes, and for all the other algorithms the restore time was 29 minutes.

Conclusion:

For licensing reasons QuickLZ cannot be used with MEB. Therefore it was replaced with LZ4. Thus, the new compression algorithms are LZ4 (for fast compression) and LZMA (for high compression ratio).

本網(wǎng)站聲明
本文內(nèi)容由網(wǎng)友自願(yuàn)投稿,版權(quán)歸原作者所有。本站不承擔(dān)相應(yīng)的法律責(zé)任。如發(fā)現(xiàn)涉嫌抄襲或侵權(quán)的內(nèi)容,請(qǐng)聯(lián)絡(luò)admin@php.cn

熱AI工具

Undress AI Tool

Undress AI Tool

免費(fèi)脫衣圖片

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅(qū)動(dòng)的應(yīng)用程序,用於創(chuàng)建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線(xiàn)上人工智慧工具。

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費(fèi)的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費(fèi)的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強(qiáng)大的PHP整合開(kāi)發(fā)環(huán)境

Dreamweaver CS6

Dreamweaver CS6

視覺(jué)化網(wǎng)頁(yè)開(kāi)發(fā)工具

SublimeText3 Mac版

SublimeText3 Mac版

神級(jí)程式碼編輯軟體(SublimeText3)

熱門(mén)話(huà)題

什麼是GTID(全球交易標(biāo)識(shí)符),其優(yōu)勢(shì)是什麼? 什麼是GTID(全球交易標(biāo)識(shí)符),其優(yōu)勢(shì)是什麼? Jun 19, 2025 am 01:03 AM

GTID(全局事務(wù)標(biāo)識(shí)符)通過(guò)為每個(gè)事務(wù)分配唯一標(biāo)識(shí),解決了MySQL數(shù)據(jù)庫(kù)中復(fù)制和故障轉(zhuǎn)移的復(fù)雜性。1.它簡(jiǎn)化了復(fù)制管理,自動(dòng)處理日志文件和位置,使從服務(wù)器能基于最后執(zhí)行的GTID請(qǐng)求事務(wù)。2.保證跨服務(wù)器的一致性,確保每個(gè)事務(wù)在每臺(tái)服務(wù)器上僅應(yīng)用一次,避免數(shù)據(jù)不一致。3.提升故障排查效率,GTID包含服務(wù)器UUID和序列號(hào),便于追蹤事務(wù)流并精準(zhǔn)定位問(wèn)題。這三項(xiàng)核心優(yōu)勢(shì)使MySQL復(fù)制更穩(wěn)健、易管,顯著提升系統(tǒng)可靠性與數(shù)據(jù)完整性。

MySQL Master故障轉(zhuǎn)移的典型過(guò)程是什麼? MySQL Master故障轉(zhuǎn)移的典型過(guò)程是什麼? Jun 19, 2025 am 01:06 AM

MySQL主庫(kù)故障切換主要包括四個(gè)步驟。 1.故障檢測(cè):通過(guò)監(jiān)控系統(tǒng)定期檢查主庫(kù)進(jìn)程、連接狀態(tài)及執(zhí)行簡(jiǎn)單查詢(xún)判斷是否宕機(jī),設(shè)置重試機(jī)制避免誤判,並可藉助MHA、Orchestrator或Keepalived等工具輔助檢測(cè);2.選擇新主庫(kù):根據(jù)數(shù)據(jù)同步進(jìn)度(Seconds_Behind_Master)、binlog數(shù)據(jù)完整性、網(wǎng)絡(luò)延遲與負(fù)載情況選取最合適從庫(kù)接替,必要時(shí)進(jìn)行數(shù)據(jù)補(bǔ)償或人工干預(yù);3.切換拓?fù)洌簩⑵渌麖膸?kù)指向新主庫(kù),執(zhí)行RESETMASTER或啟用GTID,更新VIP、DNS或代理配置以

如何使用命令行連接到MySQL數(shù)據(jù)庫(kù)? 如何使用命令行連接到MySQL數(shù)據(jù)庫(kù)? Jun 19, 2025 am 01:05 AM

連接MySQL數(shù)據(jù)庫(kù)的步驟如下:1.使用基本命令格式mysql-u用戶(hù)名-p-h主機(jī)地址進(jìn)行連接,輸入用戶(hù)名和密碼後即可登錄;2.若需直接進(jìn)入指定數(shù)據(jù)庫(kù),可在命令後加上數(shù)據(jù)庫(kù)名,如mysql-uroot-pmyproject;3.若端口非默認(rèn)3306,需添加-P參數(shù)指定端口號(hào),如mysql-uroot-p-h192.168.1.100-P3307;此外,遇到密碼錯(cuò)誤可重新輸入,連接失敗需檢查網(wǎng)絡(luò)、防火牆或權(quán)限設(shè)置,若缺少客戶(hù)端可在Linux上通過(guò)包管理器安裝mysql-client。掌握這些命令

為什麼InnoDB現(xiàn)在是推薦的存儲(chǔ)引擎? 為什麼InnoDB現(xiàn)在是推薦的存儲(chǔ)引擎? Jun 17, 2025 am 09:18 AM

InnoDB是MySQL的默認(rèn)存儲(chǔ)引擎,因其在可靠性、並發(fā)性能和崩潰恢復(fù)方面優(yōu)於MyISAM等其他引擎。 1.它支持事務(wù)處理,遵循ACID原則,確保數(shù)據(jù)完整性,適用於金融記錄或用戶(hù)賬戶(hù)等關(guān)鍵數(shù)據(jù)場(chǎng)景;2.採(cǎi)用行級(jí)鎖而非表級(jí)鎖,提升高並發(fā)寫(xiě)入環(huán)境下的性能與吞吐量;3.具備崩潰恢復(fù)機(jī)制及自動(dòng)修復(fù)功能,並支持外鍵約束,保障數(shù)據(jù)一致性與引用完整性,防止孤立記錄和數(shù)據(jù)不一致問(wèn)題。

為什麼索引可以提高M(jìn)ySQL查詢(xún)速度? 為什麼索引可以提高M(jìn)ySQL查詢(xún)速度? Jun 19, 2025 am 01:05 AM

IndexesinMySQLimprovequeryspeedbyenablingfasterdataretrieval.1.Theyreducedatascanned,allowingMySQLtoquicklylocaterelevantrowsinWHEREorORDERBYclauses,especiallyimportantforlargeorfrequentlyqueriedtables.2.Theyspeedupjoinsandsorting,makingJOINoperation

MySQL中的交易隔離級(jí)別是多少?默認(rèn)值是哪個(gè)? MySQL中的交易隔離級(jí)別是多少?默認(rèn)值是哪個(gè)? Jun 23, 2025 pm 03:05 PM

MySQL的默認(rèn)事務(wù)隔離級(jí)別是可重複讀(RepeatableRead),它通過(guò)MVCC和間隙鎖防止臟讀和不可重複讀,並在大多數(shù)情況下避免幻讀;其他主要級(jí)別包括讀未提交(ReadUncommitted),允許臟讀但性能最快,1.讀已提交(ReadCommitted)確保讀取已提交數(shù)據(jù)但可能遇到不可重複讀和幻讀,2.可重複讀(RepeatableRead)默認(rèn)級(jí)別,保證事務(wù)內(nèi)多次讀取結(jié)果一致,3.串行化(Serializable)最高級(jí)別,通過(guò)鎖阻止其他事務(wù)修改數(shù)據(jù),確保數(shù)據(jù)完整性但犧牲性能;可通過(guò)

MySQL交易的酸特性是什麼? MySQL交易的酸特性是什麼? Jun 20, 2025 am 01:06 AM

MySQL事務(wù)遵循ACID特性,確保數(shù)據(jù)庫(kù)事務(wù)的可靠性和一致性。首先,原子性(Atomicity)保證事務(wù)作為不可分割的整體執(zhí)行,要么全部成功,要么全部失敗回滾,例如轉(zhuǎn)賬操作中取款和存款必須同時(shí)完成或同時(shí)不發(fā)生;其次,一致性(Consistency)確保事務(wù)將數(shù)據(jù)庫(kù)從一個(gè)有效狀態(tài)轉(zhuǎn)換到另一個(gè)有效狀態(tài),通過(guò)約束、觸發(fā)器等機(jī)制保持?jǐn)?shù)據(jù)邏輯正確;第三,隔離性(Isolation)控制多個(gè)事務(wù)並發(fā)執(zhí)行時(shí)的可見(jiàn)性,防止臟讀、不可重複讀和幻讀,MySQL支持ReadUncommitted、ReadCommi

如何將MySQL bin目錄添加到系統(tǒng)路徑 如何將MySQL bin目錄添加到系統(tǒng)路徑 Jul 01, 2025 am 01:39 AM

要將MySQL的bin目錄添加到系統(tǒng)PATH,需根據(jù)不同操作系統(tǒng)進(jìn)行配置。 1.Windows系統(tǒng):找到MySQL安裝目錄下的bin文件夾(默認(rèn)路徑通常為C:\ProgramFiles\MySQL\MySQLServerX.X\bin),右鍵“此電腦”→“屬性”→“高級(jí)系統(tǒng)設(shè)置”→“環(huán)境變量”,在“系統(tǒng)變量”中選中Path並編輯,新增MySQLbin路徑,保存後重啟命令提示符並輸入mysql--version驗(yàn)證;2.macOS和Linux系統(tǒng):Bash用戶(hù)編輯~/.bashrc或~/.bash_

See all articles