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

Bug #1207500 reported by Marc Castrovinci on 2013-08-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to
Status tracked in 5.6
Fix Released
Raghavendra D Prabhu
Fix Released
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.


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

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

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers