You are here

Need a command line RAM disk tool to work with PortableApps

1 post / 0 new
mianwo
Offline
Last seen: 15 years 6 months ago
Joined: 2009-05-04 21:46
Need a command line RAM disk tool to work with PortableApps

I'm looking for a RAM disk tool that can work in command lines so it can be integrated into PortableApps. I think it's the last piece of my Apache performance boost puzzle.

I've been trying to increase the performance of Apache within xampplite installed on my usb drive.

My recent experiment shows that simply moving php scripts to a ram disk will boost the performance dramatically. I'm talking about 3-4 times faster than leaving php files on USB device! My Drupal installation on USB drive took more than 8 seconds to generate the home page, and now with the scripts on RAM disk(everything else is still on USB device, including mysql db), it took less than 1.5 seconds!

I think that's because even with the php accelerator like APC enabled, apache is still trying to check every php script for possible update. And that process is slowed down by the read speed of USB device.

So I came up with an idea of using 2 command scripts to perform extra RAM disk operations before and after the server start/shutdown.

The start script will do
1. Create a RAM disk
2. Copy site source files to the RAM disk
3. Start the server, both Apache and MySQL

The stop script will do
1. Stop the server
2. Copy site source files back to USB device
3. Remove the RAM disk

Since the php script files are relatively small, these extra copying process won't cause too much trouble.

I already have a RAM disk tool and it works fine, but it's not that portable...
It needs a install process to create the RAM disk, so it can't be done in command lines.

So the only thing I need now is a RAM disk tool that can create and remove RAM disks in command line without installation. If that kind of tool exists, the above idea will be truly portable! Otherwise I'll have to install the RAM disk on every PC I use.