It seems stupid but if you max out your upload speed, your download speed will be down to a minimum. If you start uploading a file and then open another website which you know is usually fast, is it slow again? Check to see if it is not your internet connection that is the problem rather than nginx+server.<div>
<br class="webkit-block-placeholder"></div><div>Kiril<br><br><div class="gmail_quote">On Tue, Mar 11, 2008 at 6:33 PM, Dave Cheney &lt;<a href="mailto:dave@cheney.net">dave@cheney.net</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
My suspicion would be IO load.<br>
<br>
Nginx buffers the upload to a file on disk before then transfering the<br>
upload in full to mongrel (so there is a big read load at that point).<br>
Mongrel then writes the file to disk (writes conflicting with reads),<br>
then rails unpacks the file into its mime components (look in your<br>
temp directory), so more read and write load.<br>
<br>
What does iostat or vmstat say? What is your IO subsystem like ? what<br>
does hdparm say, etc, etc.<br>
<br>
Cheers<br>
<font color="#888888"><br>
Dave<br>
</font><div><div></div><div class="Wj3C7c"><br>
On 12/03/2008, at 8:50 AM, Son Pan wrote:<br>
<br>
&gt; I am using 2 Nginx worker processes (1024 connections). Nginx proxies<br>
&gt; the requests to 4 mongrel instances. I have noticed that during file<br>
&gt; uploads (files are approx. 10 MB each), the server(machine) slows down<br>
&gt; quite a lot even though &#39;top&#39; command does not show any spikes in<br>
&gt; memory<br>
&gt; or CPU usage. Nginx is configured to send out static content. I<br>
&gt; suspect<br>
&gt; this is a problem with my Nginx setup because during uploads, all<br>
&gt; static<br>
&gt; content is served very slowly.<br>
&gt;<br>
&gt; I wonder if anyone can give me any ideas why this might be happening?<br>
&gt;<br>
&gt; Below are parts fron the nginx.conf I am using.<br>
&gt;<br>
&gt; worker_processes &nbsp;4;<br>
&gt; events {<br>
&gt; &nbsp; &nbsp;worker_connections &nbsp;1024;<br>
&gt; }<br>
&gt;<br>
&gt; http {<br>
&gt; &nbsp; &nbsp;include &nbsp; &nbsp; &nbsp; /etc/nginx/mime.types;<br>
&gt; &nbsp; &nbsp;default_type &nbsp;application/octet-stream;<br>
&gt;<br>
&gt; &nbsp; &nbsp;access_log &nbsp; &nbsp;/var/log/nginx/access.log;<br>
&gt; &nbsp; &nbsp;gzip on;<br>
&gt; &nbsp; &nbsp;gzip_min_length &nbsp;1100;<br>
&gt; &nbsp; &nbsp;gzip_buffers &nbsp; &nbsp; 4 8k;<br>
&gt; &nbsp; &nbsp;gzip_types &nbsp; &nbsp; &nbsp; text/plain text/html text/css<br>
&gt; application/x-javascript text/xml app<br>
&gt; lication/xml application/xml+rss text/javascript;<br>
&gt;<br>
&gt; &nbsp; &nbsp;sendfile &nbsp; &nbsp; &nbsp; on;<br>
&gt; &nbsp; &nbsp;tcp_nopush &nbsp; &nbsp; on;<br>
&gt;<br>
&gt; &nbsp; &nbsp;#keepalive_timeout &nbsp;0;<br>
&gt; &nbsp; &nbsp;keepalive_timeout &nbsp;65;<br>
&gt; &nbsp; &nbsp;tcp_nodelay &nbsp; &nbsp; &nbsp; &nbsp;off;<br>
&gt;<br>
&gt; Thanks!<br>
&gt; --<br>
&gt; Posted via <a href="http://www.ruby-forum.com/" target="_blank">http://www.ruby-forum.com/</a>.<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br></div>