Welcome! Log In Create A New Profile

Advanced

Re: hard-disk util% got higher on enabling aio for nginx-1.2.1

February 05, 2013 01:54AM
Hello

It looks like you'r eon my spot right now.
I learned directio is useless for large files as it set nginx to skip
caching for anything larger than 512 Kb.
If you have enough RAM (128MB maybe) you get to cache videos and avoid
reading from HDD each time.
Some other people here said aio is not ideally either at least on Centos,
they said about FreeBSD but I have to google a bit on that.

I made it work using more servers, alrge one with slow HDDs for storage and
fast server with SSD for caching.

So I have a setup of 1 www, 1 mysql, 2 storage, 2 edge servers and 2
converter servers each dealing with their specific tasks.
It works fine for 10Gbit and about 2500 users per second.

---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.com
Crilance.blogspot.com


On Mon, Feb 4, 2013 at 7:38 PM, shahzaib shahzaib <shahzaib.cb@gmail.com>wrote:

> Hello,
>
> I followed this post
> http://stackoverflow.com/questions/11250798/best-file-system-for-serving-1gb-files-using-nginx-under-moderate-write-read-p
> to optimize nginx for large static files i.e (flv,mp4) and enabled aio on
> nginx config which you can see below, and after enabling aio, directio, and
> output_buffers, i could notice(iostat -x -d 3) that cpu util% got higher
> from 10.00 to 35.00 and svctime got reduced to 1.00 from 4.00. So i came to
> the conclusion that after enabling these directives , the i/o util% starts
> getting higher and svctime start getting reduced.
>
> 1.Can someone guide me if aio directive helps improving nginx flv stream,
> if yes than why it is utilizing too much hard-disk?
> 2. Reducing the svctime(iostat -x -d 3) for i/o is a good thing or not ?
>
>
> http {
> include mime.types;
> default_type application/octet-stream;
> client_body_buffer_size 128K;
> sendfile_max_chunk 128k;
> access_log off;
> sendfile off;
> client_header_timeout 3m;
> client_body_timeout 3m;
>
> server {
> listen 80;
> server_name domain.com;
> client_max_body_size 800m;
> limit_rate 100k;
>
>
> location / {
> root /var/www/html/content;
> index index.html index.htm index.php;
>
> }
> location ~ \.(flv|jpeg|jpg)$ {
> flv;
> root /var/www/html/content;
> aio on;
> directio 512;
> output_buffers 1 8m;
> expires 15d;
> valid_referers none blocked domain.com;
> if ($invalid_referer) {
> return 403;
> }
> }
>
>
> Best Regards.
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

hard-disk util% got higher on enabling aio for nginx-1.2.1

shahzaib1232 February 04, 2013 12:40PM

Re: hard-disk util% got higher on enabling aio for nginx-1.2.1

crirus February 05, 2013 01:54AM

Re: hard-disk util% got higher on enabling aio for nginx-1.2.1

shahzaib1232 February 05, 2013 02:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 224
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready