# Config question, is it good?

**URL:** <https://www.ruby-forum.com/t/config-question-is-it-good/186949>\
**Category:** NGINX\
**Created:** [April 14, 2010, 9:02pm UTC](https://www.ruby-forum.com/t/config-question-is-it-good/186949 "2010-04-14T21:02:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![max](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@max](https://www.ruby-forum.com/u/max)\
**Post date:** [April 14, 2010, 9:02pm UTC](https://www.ruby-forum.com/t/config-question-is-it-good/186949/1 "2010-04-14T21:02:22Z")

</div>

Hello,

I got a server running Intel Xeon-Nehalem 5520-Quadcore 2.2GHz + 12 gb  
ram.  
I got the following conf in my nginx, is it a good choice? But  
sometimes, I  
still found the wordpress sites are kind of slow. Sometimes, it just  
take s  
longer time to load a page and after that, the server just back to  
normal(wp  
super cache is already running).

worker\_processes 4;  
worker\_rlimit\_nofile 10240;

#error\_log logs/error.log;  
#error\_log logs/error.log notice;  
#error\_log logs/error.log info;

#pid logs/nginx.pid;

events {

# worker\_connections 1024;

}

Thanks.

Max

---

<div class="post-metadata">

**Author:** ![max](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@max](https://www.ruby-forum.com/u/max)\
**Post date:** [April 15, 2010, 10:06am UTC](https://www.ruby-forum.com/t/config-question-is-it-good/186949/2 "2010-04-15T10:06:50Z")

</div>

Check the duration of page processing in PHP code. Maybe you should  
optimize your database operation.

On Thu, Apr 15, 2010 at 3:01 AM, Max [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks.
> 
> Max
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

–  
Ren Xiaolei

---

<div class="post-metadata">

**Author:** ![max](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@max](https://www.ruby-forum.com/u/max)\
**Post date:** [April 16, 2010, 11:10pm UTC](https://www.ruby-forum.com/t/config-question-is-it-good/186949/3 "2010-04-16T23:10:01Z")

</div>

Be sure WP-Super-Cache is really working, although I think you already  
have done that. You can do this looking at the last lines of the page  
source code.

[…]

Refresh the source code (you can configure WP-Super-Cache to don’t log  
pages for logged in users) and you will realize that the PHP  
processing and database may not be the bottleneck.

I had a the same problem you are having. My wordpress sites were very  
slow.

I solved this using the  
[http://code.google.com/intl/en-US/speed/page-speed/](http://code.google.com/intl/en-US/speed/page-speed/) to diagnostic what  
were really slow. You don’t have to follow all the recommendations of  
PageSpeed but you will get a great improvement if you start to use  
gzip for javascript and css files. The most important recommendation  
is to set cache expiration of icons and other images properly.

I think Apache uses gzip for css and javascript for default but I  
really don’t know this for sure.

I have tried to do this with nginx and the only way I achieved this  
was using gzip\_static. I must generate the .css.gz and .js.gz files  
with a script I had programmed but it works very well and I can,  
without any server performance loss, use the highest gzip compression  
level.

–  
Felipe
