# Trouble

**URL:** <https://www.ruby-forum.com/t/trouble/145818>\
**Category:** NGINX\
**Created:** [August 14, 2008, 9:35am UTC](https://www.ruby-forum.com/t/trouble/145818 "2008-08-14T09:35:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 9:35am UTC](https://www.ruby-forum.com/t/trouble/145818/1 "2008-08-14T09:35:27Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 9:50am UTC](https://www.ruby-forum.com/t/trouble/145818/2 "2008-08-14T09:50:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 9:50am UTC](https://www.ruby-forum.com/t/trouble/145818/3 "2008-08-14T09:50:42Z")

</div>

2008/8/14 weichenqi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 10:04am UTC](https://www.ruby-forum.com/t/trouble/145818/4 "2008-08-14T10:04:47Z")

</div>

My god you are annoying. Wait for a reply like everybody else!

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 9:59am UTC](https://www.ruby-forum.com/t/trouble/145818/5 "2008-08-14T09:59:29Z")

</div>

no

2008/8/14 Almir K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 11:40am UTC](https://www.ruby-forum.com/t/trouble/145818/6 "2008-08-14T11:40:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/trouble/145818/7 "2008-08-14T13:08:16Z")

</div>

I agree with you.

2008-08-14

Chancey

å‘ä»¶äººï¼š Tit P.  
å‘é€æ—¶é—´ï¼š 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

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/trouble/145818/8 "2008-08-14T16:54:44Z")

</div>

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

2008/8/14 Aleksandar L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 12:03pm UTC](https://www.ruby-forum.com/t/trouble/145818/9 "2008-08-14T12:03:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/trouble/145818/10 "2008-08-14T19:23:08Z")

</div>

Perhaps you could post the config file?

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 14, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/trouble/145818/11 "2008-08-14T18:33:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 3:13am UTC](https://www.ruby-forum.com/t/trouble/145818/12 "2008-08-15T03:13:01Z")

</div>

ok

2008/8/15 Igor C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 4:03am UTC](https://www.ruby-forum.com/t/trouble/145818/13 "2008-08-15T04:03:22Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 3:33am UTC](https://www.ruby-forum.com/t/trouble/145818/14 "2008-08-15T03:33:29Z")

</div>

Maybe apache handled only 4MBps of traffic and nginx can handle much  
more?

On Fri, 15 Aug 2008 09:06:38 +0800, “cq wei” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > > > condition.For example,established connections is 3000,apache’s  
> > > > Are you sure that the requests are the same, the data which are  
> > > > Igor C. â€¢ POKE â€¢ 10 Redchurch Street â€¢ E2 7DD â€¢ +44 (0)20  
> > > > 7749 5355 â€¢  
> > > > [www.pokelondon.com](http://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/](http://idev.si/)  
VAT #: SI43028195  
Company ID #: 2346265  
Mobile #: +386 70 819 789

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 5:41am UTC](https://www.ruby-forum.com/t/trouble/145818/15 "2008-08-15T05:41:36Z")

</div>

Do the test.I find use gzip is the same as not in nginx.

2008/8/15 iDEV d. o. o. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 4:31am UTC](https://www.ruby-forum.com/t/trouble/145818/16 "2008-08-15T04:31:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 7:30am UTC](https://www.ruby-forum.com/t/trouble/145818/17 "2008-08-15T07:30:20Z")

</div>

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

2008/8/15 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 7:01am UTC](https://www.ruby-forum.com/t/trouble/145818/18 "2008-08-15T07:01:06Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 7:51am UTC](https://www.ruby-forum.com/t/trouble/145818/19 "2008-08-15T07:51:59Z")

</div>

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

2008/8/15 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cq\_wei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cq\_wei](https://www.ruby-forum.com/u/cq_wei)\
**Post date:** [August 15, 2008, 7:36am UTC](https://www.ruby-forum.com/t/trouble/145818/20 "2008-08-15T07:36:46Z")

</div>

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.

[Next page](https://www.ruby-forum.com/t/trouble/145818.md?page=2)
