News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kevin Schroeder:
More - The file system is slow
September 30, 2013 @ 10:44:29

As a follow-up to his previous article about the (minimal) overhead from logging, Kevin Schroeder has this new post focusing on the common belief that writing to the file system is the slowest method.

I had a conversation the other day by a person I respect (I respect any PHP developer who knows how to use strace) about the cost of file IO. My assertion has been, and has been for a long time, that file IO is not the boogeyman that it is claimed to be. So I decided to test a cross between those two posts.

His test was to write one million log records to two different sources - the normal physical file system, a RAM drive - one run with a file handle that's left open and the other with a new handle each time. He shows how he made the RAM drive and the PHP he used for the test (running in a VM). He graphs out the results with some interesting results...but you'll have to read the post for that.

0 comments voice your opinion now!
file system slow write log overhead benchmark ramdisk graph

Link: http://www.eschrade.com/page/more-on-the-file-system-is-slow/

Damian Sromek's Blog:
[How to] Run PHPUnit tests using database 10x faster
January 06, 2011 @ 13:17:26

Damian Sromek has a helpful unit testing hint for those working with database-heavy tests - less about code, more about server setup.

PHPUnit tests that are heavily using the database can run like 10x faster when you run the database from the RAMDisk. It's the easiest way I know to improve the speed of the tests execution.

Because of the slowness that could be caused by running unit tests that rely heavily on the database, he suggests setting up a testing instance on a RAMDisk (or something similar). The speed difference he noticed was huge with his tests normally running about 25 minutes. Moving it over to the RAM disk dropped their execution time down to around 2:30, a jump of around 10 times faster.

0 comments voice your opinion now!
phpunit unittest database ramdisk performance



Community Events





Don't see your event here?
Let us know!


list podcast series interview library symfony conference api zendserver framework voicesoftheelephpant community laravel introduction deployment bugfix release language tips developer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework