I saw a question on this in the archive, but no responses. Also haven’t
been able to find much of anything via Google, so here goes.
I’ve got a workflow app built on Rails that involves checking out
files and checking them back in after local processing. This is done
file form element, pretty standard. Some of these files can be quite
so I am looking for ways to improve performance.
I’ve implemented one change already that has helped, namely utilizing
File.move on the uploaded temp file, rather than reading it into memory
writing to a new file as is usually done in example code. On my
laptop this was a huge improvement.
However, on my production server, the rails app’s document storage is on
network mount, while the web server’s temp directory is of course local.
File.move has to copy the data between filesystems. It’s actually still
faster than having Ruby read and write the files, but not as dramatic.
I’m using an Apache frontend proxied to pack-of-mongrels setup.
How can I direct mongrel to write uploaded files to a network mount?
While it may be slower then local disk, it would save time overall if
system could keep the uploaded file on the same filesystem when moving
Thanks for any info,