We're updating the issue view to help you get more done.Learn more

Slow file extend when innodb_use_fallocate=1 and SSD file storage

Currently size is set like:

current_size = 0;
desired_size = (ib_int64_t)size + (((ib_int64_t)size_high) << 32);

#ifdef HAVE_POSIX_FALLOCATE
if (srv_use_posix_fallocate) {

if (posix_fallocate(file, current_size, desired_size) == -1) {

Thus file size is always extended from offset 0 to desired offset. This is clearly slower than doing

posix_fallocate(real_current_size, desired_size)

Status

Assignee

Jan Lindström

Reporter

Jan Lindström