Incremental restore in XB 2.4 requires 1+GB of RAM
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB | Status tracked in 2.4 | |||||
2.4 |
Fix Released
|
Medium
|
Sergei Glushchenko |
Bug Description
Steps to reproduce:
-------------------
S1. Create a low memory VM e.g. <1GB (alternatively, limit with ulimit/cgroup)
S2. Make sure swap is off
S3. Create full backup + incremental backup
S4. Try to restore
S5. See a failure on incremental:
...
Applying /db/mysql_
InnoDB: Retry attempts for reading partial data failed.
InnoDB: Tried to read 16384 bytes at offset 0 was only able to read0
InnoDB: Operating system error number 14 in a file operation.
InnoDB: Error number 14 means 'Bad address'
...
What is expected:
-----------------
W1. Make sure out-of-memory error is properly reported (check malloc() return)
W2. Use smaller buffer of 64MB as before or even less, do not use UNIV_PAGE_SIZE_MAX in calculations
W3. Obey --use-memory as much as possible
Debug results:
--------------
D1. xtrabackup.cc:5844 (https:/
...
incremental_
(ut_malloc_
UNIV_
incremental_buffer = static_cast<byte *>
(ut_align(
UNIV_
...
D2. incremental_
D3. UNIV_PAGE_SIZE_MAX has changed due to change of UNIV_PAGE_
#define UNIV_PAGE_SIZE_MAX (1 << UNIV_PAGE_
D4. Consequences memory usage for the buffer raised from ~64MB to ~1GB
It may not look like important for production. However, it has implications for test automation activities involving XB.
Please consider returning memory usage back to fixed 64MB for incremental buffer at least.