Req #71052 [NEW]: Improvement: file operations 3 times slower than Linux on GlusterFS mount

From: Date: Mon, 07 Dec 2015 15:47:25 +0000
Subject: Req #71052 [NEW]: Improvement: file operations 3 times slower than Linux on GlusterFS mount
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197665@lists.php.net to get a copy of this message
From: oytuntez at gmail dot com Operating system: Amazon Linux AMI 2015.09 PHP version: 5.6.16 Package: Filesystem function related Bug Type: Feature/Change Request Bug description:Improvement: file operations 3 times slower than Linux on GlusterFS mount Description: ------------ Purpose: move a file from local mount to a GlusterFS mount. File: 16MB XML. Vanilla PHP operation: use rename() to move the file. Linux command: shell_exec("mv '$sourcePath' '$targetPath'") Note: My glusterFS mount has a terrible performance at the moment, writes usually around 2MB/s, so it is making a good testing environment for read/write operations. Result: - PHP rename() takes about 56.2257 seconds to move the file. - Linux command via shell_exec takes 15.8680s. The latter takes 3.5433 less time than PHP's rename(). Test script: --------------- $path1 = '/tmp/1220631606.xliff'; $path2 = '/gluster_mount/'.rand(); $start = microtime(true); rename($path1, $path2); $end = microtime(true); echo 'rename time: '.($end-$start).PHP_EOL; $start = microtime(true); shell_exec("mv '".$path1."' '".$path2."'"); $end = microtime(true); echo 'shell_exec time: '.($end-$start).PHP_EOL; -- Edit bug report at https://bugs.php.net/bug.php?id=71052&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71052&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71052&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71052&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71052&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71052&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71052&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71052&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71052&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71052&r=support Expected behavior: https://bugs.php.net/fix.php?id=71052&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71052&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71052&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71052&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71052&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71052&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71052&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71052&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71052&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71052&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71052&r=mysqlcfg

« previous php.bugs (#197665) next »