# Upload performance

**URL:** <https://www.ruby-forum.com/t/upload-performance/112112>\
**Category:** Rails\
**Created:** [August 15, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/upload-performance/112112 "2007-08-15T15:26:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pier\_Luigi\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@Pier\_Luigi\_R](https://www.ruby-forum.com/u/Pier_Luigi_R)\
**Post date:** [August 15, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/upload-performance/112112/1 "2007-08-15T15:26:32Z")

</div>

Hello,

I’ve been doing some tests for uploading large files (say \> 50MB) from  
a form using ruby on rails, has anyone experienced poor performance  
during this operation ?  
I’ve tried every method described in wikis, tutorials, and even a few  
plugins to do this. In all cases the CPU of my (old) powerbook G4 goes  
to 100%, and it takes about a minute to upload a 50MB file to  
localhost, and more than 5 minutes for a 100MB file. I’ve tried the  
same operation in php and it takes about 15 seconds without occupying  
all the resources.  
At first i thought it was a matter of what code i was using to save  
the file, but in later tests i discovered that the process slows down  
just during the upload process, even if my controller code is no more  
than calling the array params[:uploaded\_file], without saving the file  
anywhere. I don’t know what to think, maybe it is some flaw with  
WEBrick…  
I am currently using php to save the file in my application, but I  
would like to know if there is a “rails way” that you know.

thanks in advance,  
Pier Luigi R.

p.s. I’m a newbie, please don’t be rude

---

<div class="post-metadata">

**Author:** ![Pier\_Luigi\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@Pier\_Luigi\_R](https://www.ruby-forum.com/u/Pier_Luigi_R)\
**Post date:** [August 17, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/upload-performance/112112/2 "2007-08-17T20:42:29Z")

</div>

no one with the same problem ?

---

<div class="post-metadata">

**Author:** ![Pier\_Luigi\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@Pier\_Luigi\_R](https://www.ruby-forum.com/u/Pier_Luigi_R)\
**Post date:** [August 17, 2007, 8:49pm UTC](https://www.ruby-forum.com/t/upload-performance/112112/3 "2007-08-17T20:49:30Z")

</div>

Pier Luigi R. wrote:

> no one with the same problem ?

Last time I did huge uploads (around 500MB), the upload pretty much  
filled the 100Mbit/s available bandwidth on the LAN. I didn’t check the  
CPU usage though. The only problem was memory usage. If I had to put  
such a thing in production, I won’t use Rails for the upload, there are  
Mongrel plugins and web server extensions designed to do file upload  
without monopolizing a Rails process (and bringing its resident memory  
size through the roof), Google them, IIRC you can find Howtos to  
integrate them with Rails.

Lionel

---

<div class="post-metadata">

**Author:** ![Pier\_Luigi\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@Pier\_Luigi\_R](https://www.ruby-forum.com/u/Pier_Luigi_R)\
**Post date:** [August 18, 2007, 2:42pm UTC](https://www.ruby-forum.com/t/upload-performance/112112/4 "2007-08-18T14:42:55Z")

</div>

On 17 Ago, 20:48, Lionel B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> there are  
> Mongrel plugins and web server extensions designed to do file upload  
> without monopolizing a Rails process (and bringing its resident memory  
> size through the roof),

I will do some tests and get back with the results, thank you

pier luigi

---

<div class="post-metadata">

**Author:** ![Pier\_Luigi\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@Pier\_Luigi\_R](https://www.ruby-forum.com/u/Pier_Luigi_R)\
**Post date:** [August 20, 2007, 2:10pm UTC](https://www.ruby-forum.com/t/upload-performance/112112/5 "2007-08-20T14:10:44Z")

</div>

try Merb [http://merb.rubyforge.org](http://merb.rubyforge.org) to upload files.

2007/8/18, Pier Luigi R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
