Ruby Forum NGINX > trouble

Posted by cq wei (Guest)
on 14.08.2008 09:35
(Received via mailing list)
hello,i am a linux system administrator ,and i have problem now,the 
nginx as
picture server,the bandwidth
is higher than apache in the same condition.For example,established
connections is 3000,apache's bandwidth is about 4MB,but the nginx is 
about
7MB,i am sure the two servers  run the same services,and in the same
datacenter .what should i do,maybe i should modify config files,but i 
don't
know what should i do.Could you help me,thanks!
Posted by Almir Karic (Guest)
on 14.08.2008 09:50
(Received via mailing list)
On Thu, Aug 14, 2008 at 03:28:05PM +0800, cq wei wrote:
> hello,i am a linux system administrator ,and i have problem now,the nginx as
> picture server,the bandwidth
> is higher than apache in the same condition.For example,established
> connections is 3000,apache's bandwidth is about 4MB,but the nginx is about
> 7MB,i am sure the two servers  run the same services,and in the same
> datacenter .what should i do,maybe i should modify config files,but i don't
> know what should i do.Could you help me,thanks!

did you have things like mod_expire enabled on apache?
Posted by cq wei (Guest)
on 14.08.2008 09:50
(Received via mailing list)
2008/8/14 weichenqi <weichenqi@gmail.com>
Posted by cq wei (Guest)
on 14.08.2008 09:59
(Received via mailing list)
no

2008/8/14 Almir Karic <almir@kiberpipa.org>
Posted by Tit Petrič (black)
on 14.08.2008 10:04
(Received via mailing list)
My god you are annoying. Wait for a reply like everybody else!
Posted by Aleksandar Lazic (Guest)
on 14.08.2008 11:40
(Received via mailing list)
Hi cq wei,

On Don 14.08.2008 15:28, cq wei wrote:
>hello,i am a linux system administrator ,and i have problem now,the
>nginx as picture server,the bandwidth is higher than apache in the same
>condition.For example,established connections is 3000,apache's
>bandwidth is about 4MB,but the nginx is about 7MB,i am sure the two
>servers run the same services,and in the same datacenter .what should i
>do,maybe i should modify config files,but i don't know what should i
>do.Could you help me,thanks!

Does you mean that with 3000 R/s you deliver 4MB with Apache and 7MB
with nginx?

Are you sure that the requests are the same, the data which are deliverd
and the r/s also?

BR

Aleks
Posted by Tit Petrič (black)
on 14.08.2008 12:03
(Received via mailing list)
Also, look at gzip compression, you might want to have to turn that on
in nginx (in case you have it in apache).

I don't see any other way to have such a big difference without

1. difference with compression
2. difference with request ammount
3. difference with request caching, mod_expires (as mentioned before by
almir)

Lp
Posted by Chancey (Guest)
on 14.08.2008 13:08
(Received via mailing list)
I agree with you.


2008-08-14



Chancey



发件人: Tit Petric
发送时间: 2008-08-14  18:01:20
收件人: nginx
抄送:
主题: Re: trouble

Also, look at gzip compression, you might want to have to turn that on
in nginx (in case you have it in apache).
I don't see any other way to have such a big difference without
1. difference with compression
2. difference with request ammount
3. difference with request caching, mod_expires (as mentioned before by
almir)
Lp
Posted by cq wei (Guest)
on 14.08.2008 16:54
(Received via mailing list)
I am sure,others have asked me the same question.So,I think that the 
problem
is in config file.

2008/8/14 Aleksandar Lazic <al-nginx@none.at>
Posted by Michael (Guest)
on 14.08.2008 18:33
(Received via mailing list)
On Thu, Aug 14, 2008 at 22:49:42, cq wei said...

>    I am sure,others have asked me the same question.So,I think that the
>    problem is in config file.

I really don't see what difference the web server would make here.

You should do some research and compare individual requests, rather than
talking about vague large numbers, especially when you cannot guarantee 
that
*exactly* the same requests were made to both servers.  Right now, there 
are
too many variables to know what's really going on.
Posted by Igor Clark (Guest)
on 14.08.2008 19:23
(Received via mailing list)
Perhaps you could post the config file?
Posted by cq wei (Guest)
on 15.08.2008 03:13
Attachment: nginx.conf.txt (2,9 KB)
(Received via mailing list)
ok

2008/8/15 Igor Clark <igor@pokelondon.com>
Posted by iDEV d.o.o. (Guest)
on 15.08.2008 03:33
(Received via mailing list)
Maybe apache handled only 4MBps of traffic and nginx can handle much 
more?

On Fri, 15 Aug 2008 09:06:38 +0800, "cq wei" <weichenqi@gmail.com> 
wrote:
>>
>>>> condition.For example,established connections is 3000,apache's
>>> Are you sure that the requests are the same, the data which are
>> Igor Clark • POKE • 10 Redchurch Street • E2 7DD • +44 (0)20
> 7749 5355 •
>> www.pokelondon.com
>>
>>
>>
>>
--

iDEV, podjetje za spletne storitve, d.o.o.
Tomaž Marhat, CEO
Brda 15A
SI-2383 � martno pri Slovenj Gradcu
SLOVENIA - EU

Web: http://idev.si/
VAT #: SI43028195
Company ID #: 2346265
Mobile #: +386 70 819 789
Posted by walt (Guest)
on 15.08.2008 04:03
(Received via mailing list)
I use httpwatch to test a same image in apache and nginx.The result is
               size
apache     457
nginx        699
I think that is where the question arises.

2008/8/15 iDEV d. o. o. <info@idev.si>
Posted by iDEV d.o.o. (Guest)
on 15.08.2008 04:31
(Received via mailing list)
I'm not sure if apache compresses images, but it is possible. And nginx
does not compresses content by default.
Maybe there's the diffrence.
Posted by walt (Guest)
on 15.08.2008 05:41
(Received via mailing list)
Do the test.I find use gzip is the same as not in nginx.

2008/8/15 iDEV d. o. o. <info@idev.si>
Posted by Igor Sysoev (Guest)
on 15.08.2008 07:01
(Received via mailing list)
On Fri, Aug 15, 2008 at 09:56:06AM +0800, walt wrote:

> I use httpwatch to test a same image in apache and nginx.The result is
>                size
> apache     457
> nginx        699
> I think that is where the question arises.

What is this size ? Size of the image or size of image + HTTP header 
size ?
What the size of the image itself ?
Posted by walt (Guest)
on 15.08.2008 07:30
(Received via mailing list)
I am not very sure,the image is 27.88KB itself.

2008/8/15 Igor Sysoev <is@rambler-co.ru>
Posted by Igor Sysoev (Guest)
on 15.08.2008 07:36
(Received via mailing list)
On Fri, Aug 15, 2008 at 01:24:45PM +0800, walt wrote:

> I am not very sure,the image is 27.88KB itself.

Then I do not understand what 457 and 699 mean.
Posted by walt (Guest)
on 15.08.2008 07:51
(Received via mailing list)
So do I,but why apache's is smaller than nginx,this is ture.

2008/8/15 Igor Sysoev <is@rambler-co.ru>
Posted by Denis S. Filimonov (Guest)
on 15.08.2008 08:05
(Received via mailing list)
A wild guess: could it be the error page?
Posted by Charles McGarvey (Guest)
on 15.08.2008 08:05
Attachment: signature.asc (251 Bytes)
(Received via mailing list)
Igor Sysoev wrote:
>>>> I use httpwatch to test a same image in apache and nginx.The result is
>>> http://sysoev.ru/en/
>>>
>>>
> 

Maybe I don't understand this whole discussion, but why doesn't someone
just tcpdump both transactions and _see_ what the difference is?  I
can't imagine a system admin would take a week to hypothesize about
config files when they could just dump the transactions to determine
what is going on.

Chaz
Posted by Igor Sysoev (Guest)
on 15.08.2008 08:10
(Received via mailing list)
On Fri, Aug 15, 2008 at 01:46:07PM +0800, walt wrote:

> So do I,but why apache's is smaller than nginx,this is ture.

Until you say what is 457 and 699 exactly the discussion will be 
helpless.
Try tcpdump as it was suggested. Try debug log.
Posted by walt (Guest)
on 15.08.2008 08:46
(Received via mailing list)
By the way,I want to ask a question,is nginx as image server is better 
than
apache?If you do test,plase tell me!

2008/8/15 Igor Sysoev <is@rambler-co.ru>
Posted by Chancey (Guest)
on 15.08.2008 09:49
(Received via mailing list)
Of course, i have tested .
There are many examples of the Internet .

I think now is the era of nginx . Apache is so heavy

2008-08-15



Chancey



发件人: walt
发送时间: 2008-08-15  14:44:40
收件人: nginx
抄送:
主题: Re: trouble

 By the way,I want to ask a question,is nginx as image server is better 
than apache?If you do test,plase tell me!


2008/8/15 Igor Sysoev <is@rambler-co.ru>

On Fri, Aug 15, 2008 at 01:46:07PM +0800, walt wrote:

> So do I,but why apache's is smaller than nginx,this is ture.


Until you say what is 457 and 699 exactly the discussion will be 
helpless.
Try tcpdump as it was suggested. Try debug log.


> > > > On Fri, Aug 15, 2008 at 09:56:06AM +0800, walt wrote:
> > > > What the size of the image itself ?
> > http://sysoev.ru/en/
> >
> >


--

Igor Sysoev
http://sysoev.ru/en/
Posted by Sean Allen (Guest)
on 15.08.2008 21:33
(Received via mailing list)
what on earth does better mean?

thats an awfully general question.