mysql-5.6 icon indicating copy to clipboard operation
mysql-5.6 copied to clipboard

Add different compression choice

Open sunshine-Chun opened this issue 1 year ago • 16 comments

Summary: when using clone to copy data in innodb instance and turn compression on. The speed is about 10 times slower than with compression off. The default compression algorithm used is zlib. Try to use other compression algorithm to tune the performance. From testing, zstd is twice faster than zlib

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

sunshine-Chun avatar May 12 '23 07:05 sunshine-Chun

Need to fix test.

sunshine-Chun avatar May 12 '23 07:05 sunshine-Chun

@sunshine-Chun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 12 '23 22:05 facebook-github-bot

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 16 '23 06:05 facebook-github-bot

@sunshine-Chun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 16 '23 06:05 facebook-github-bot

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 17 '23 05:05 facebook-github-bot

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 17 '23 17:05 facebook-github-bot

Looks like we have memory leakage from valgrind test. Need to debug a bit. Will update here once find anything.

  at 0xA5A6795: malloc (vg_replace_malloc.c:381)
   by 0x90917AD: ZSTD_customMalloc (allocations.h:30)
   by 0x90917AD: ZSTD_createDCtx_internal (zstd_decompress.c:296)
   by 0x90917AD: ZSTD_createDCtx (zstd_decompress.c:312)
by 0x7700BEA: zstd_uncompress(mysql_zstd_compress_context*, unsigned char*, unsigned long, unsigned long*) [clone .__uniq.287700427806220246369010965997275247218] (my_compress.cc:232)
   by 0x77009DE: my_uncompress(mysql_compress_context*, unsigned char*, unsigned long, unsigned long*) (my_compress.cc:699)
   by 0x64D4473: net_read_compressed_packet(NET*, unsigned long&) [clone .__uniq.40191296941203724010080517394248553221] (net_serv.cc:2259)
   by 0x64D4364: my_net_read(NET*) (net_serv.cc:2297)
   by 0x85CBC4D: mysql_clone_get_response(THD*, MYSQL*, bool, unsigned int, unsigned char**, unsigned long*, unsigned long*) (clone_protocol_service.cc:545)

sunshine-Chun avatar May 18 '23 05:05 sunshine-Chun

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 19 '23 22:05 facebook-github-bot

@sunshine-Chun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 19 '23 22:05 facebook-github-bot

Memory leakage fixed.

sunshine-Chun avatar May 19 '23 22:05 sunshine-Chun

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 19 '23 22:05 facebook-github-bot

@sunshine-Chun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 19 '23 22:05 facebook-github-bot

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 30 '23 16:05 facebook-github-bot

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 30 '23 17:05 facebook-github-bot

@sunshine-Chun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 30 '23 17:05 facebook-github-bot

@sunshine-Chun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Jun 02 '23 16:06 facebook-github-bot