Percona XtraDB Cluster - HA scalable solution for MySQL

mysql service script does not allow enough time for preallocation of a large gcache.size

Reported by Marc Castrovinci on 2013-08-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster
Status tracked in Trunk
5.6
Undecided
Raghavendra D Prabhu
Trunk
Undecided
Raghavendra D Prabhu

Bug Description

When setting gcache.size to a larger value than the default 128M, the mysql service command does not allow enough time for the file to be preallocated.

To repeat:
Set wsrep_provider_options="gcache.size=1G" in my.cnf
run: service mysql bootstrap-pxc ( or start )

The service will report failed while the file is still being written. This is very problematic in a chef recipe as it reports failed causing chef to stop.

Marc,

The pre-allocation is done with posix_fallocate which is O(1) on
most filesystems - ie. the time to preallocate is independent of
size.

Now, when posix_fallocate fails, the fallback is to physically
write zeroes to the file which can be very time consuming.

What is the filesystem where the datadir is located and which
distro is this. Seems like posix_fallocate is not supported on
that platform.

Its an AWS EC2 instance, Ubuntu 12.04.2 LTS and i'm using the /mnt (/dev/xvdb) which is ext3. Maybe my bind or something is causing posix_fallocate to not be supported.

/dev/xvdb on /mnt type ext3 (rw,_netdev)
/mnt/galera on /mnt/galera type none (rw,bind)

The bind should work fine but ext3 on that distro/kernel may not support posix_fallocate.

The solution to this is to increase the init script timeout when gcache file is missing. But this requires many workarounds and won't be accurate (since it depends on I/O rate etc.).

Changed in percona-xtradb-cluster:
milestone: none → future-5.5
assignee: nobody → Raghavendra D Prabhu (raghavendra-prabhu)
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers