Nginx file upload: server slows down terribly during upload
Kiril Angov
kupokomapa at gmail.com
Wed Mar 12 02:55:09 MSK 2008
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.
Kiril
On Tue, Mar 11, 2008 at 6:33 PM, Dave Cheney <dave at cheney.net> wrote:
> My suspicion would be IO load.
>
> Nginx buffers the upload to a file on disk before then transfering the
> upload in full to mongrel (so there is a big read load at that point).
> Mongrel then writes the file to disk (writes conflicting with reads),
> then rails unpacks the file into its mime components (look in your
> temp directory), so more read and write load.
>
> What does iostat or vmstat say? What is your IO subsystem like ? what
> does hdparm say, etc, etc.
>
> Cheers
>
> Dave
>
> On 12/03/2008, at 8:50 AM, Son Pan wrote:
>
> > I am using 2 Nginx worker processes (1024 connections). Nginx proxies
> > the requests to 4 mongrel instances. I have noticed that during file
> > uploads (files are approx. 10 MB each), the server(machine) slows down
> > quite a lot even though 'top' command does not show any spikes in
> > memory
> > or CPU usage. Nginx is configured to send out static content. I
> > suspect
> > this is a problem with my Nginx setup because during uploads, all
> > static
> > content is served very slowly.
> >
> > I wonder if anyone can give me any ideas why this might be happening?
> >
> > Below are parts fron the nginx.conf I am using.
> >
> > worker_processes 4;
> > events {
> > worker_connections 1024;
> > }
> >
> > http {
> > include /etc/nginx/mime.types;
> > default_type application/octet-stream;
> >
> > access_log /var/log/nginx/access.log;
> > gzip on;
> > gzip_min_length 1100;
> > gzip_buffers 4 8k;
> > gzip_types text/plain text/html text/css
> > application/x-javascript text/xml app
> > lication/xml application/xml+rss text/javascript;
> >
> > sendfile on;
> > tcp_nopush on;
> >
> > #keepalive_timeout 0;
> > keepalive_timeout 65;
> > tcp_nodelay off;
> >
> > Thanks!
> > --
> > Posted via http://www.ruby-forum.com/.
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080311/329949d3/attachment.html>
More information about the nginx
mailing list