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

Bug #1207500 reported by Marc Castrovinci
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Raghavendra D Prabhu
5.6
Fix Released
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.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

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.

Revision history for this message
Marc Castrovinci (marc-castrovinci) wrote :

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)

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

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
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1409

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.