Forum: NGINX Optimization of Nginx for 128 MB RAM VPS

2974d09ac2541e892966b762aad84943?d=identicon&s=25 akurczyk (Guest)
on 2014-06-18 14:21
(Received via mailing list)
Hello,

I have a 128 MB RAM VPS with 1 vcore of 2,2 GHz x86_64 CPU. The CPU is
much
faster than the Rapsberry one so that is not a problem but the RAM
usage, I
think, is.

Could You help me optimize my Nginx installation?

Thats my configuration:

nginx.conf:

http://pastebin.com/M55APXzD

The worker_process value is set to the number of vcores which is 1, so
it's
OK, I guess.

But what with the worker_connections? I have read that this is the
number of
simultaneous connections a single process can handle. How high should
this
value be? I am expecting lets say 20 connections per hour. I will host
there
only my personal home page and my school notebook (based on Wordpress).
Will
increasing this value result in high usage of RAM by idling nginx
waiting
for new connections?

PHP-FPM pools configs:

http://pastebin.com/Ap9G2qpx

How should I configure the pm values for each of this websites/vhosts?
The
one called "zeszyt" is my notebook based on Wordpress, The "pma" one is
the
phpMyAdmin and the rest are just normal website builded with my own
simple
PHP scripts and HTML files.

Should I set there something more to e.g. to make the file upload
possible
like with the phpMyAdmin or it will just work out of the box like with
Apache and PHP module?

Thanks in advance

--
Best regards,
Aleksander Kurczyk

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,251000,251000#msg-251000
419b29425e1245886d653616ba381f00?d=identicon&s=25 Maxim Konovalov (Guest)
on 2014-06-18 14:26
(Received via mailing list)
On 6/18/14 4:21 PM, akurczyk wrote:
>  I am expecting lets say 20 connections per hour.
[...]

Personally I don't think that you need any optimizations for such load.

--
Maxim Konovalov
http://nginx.com
63f341734581b167c7b698169bdd2510?d=identicon&s=25 Lukas Tribus (Guest)
on 2014-06-18 16:20
(Received via mailing list)
> Hello,
>
> I have a 128 MB RAM VPS with 1 vcore of 2,2 GHz x86_64 CPU. The CPU is much
> faster than the Rapsberry one so that is not a problem but the RAM usage, I
> think, is.
>
> Could You help me optimize my Nginx installation?

Is this really needed? Nginx doesn't use much RAM usually. How much RAM
does
nginx use currently and what is the target usage you would like to
achieve?


The most important thing is probably to disable all plugins, third party
and build-in.



Lukas
2974d09ac2541e892966b762aad84943?d=identicon&s=25 Yumi (Guest)
on 2014-06-19 02:43
(Received via mailing list)
> But what with the worker_connections? I have read that this is the number
of simultaneous connections a single process can handle. How high should
this value be? I am expecting lets say 20 connections per hour. I will
host
there only my personal home page and my school notebook (based on
Wordpress). Will increasing this value result in high usage of RAM by
idling
nginx waiting for new connections?

As echoed by others, I'd hardly be worrying about 20 requests / hour,
but
just FYI, that's a *maximum* number, so if you're not using it, it won't
really consume more RAM.  nginx handles many connections very well, so
it
won't really matter if you set it a fair bit higher.

Generally PHP/MySQL would be your optimisation targets as they'll
consume
way more RAM than nginx, but again, for your load, I wouldn't be
worried.

> Should I set there something more to e.g. to make the file upload possible
like with the phpMyAdmin or it will just work out of the box like with
Apache and PHP module?

If you're uploading large dumps, you may wish to increase the size of
client_max_body_size:
http://nginx.org/en/docs/http/ngx_http_core_module...

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,251000,251031#msg-251031
F28f13d5607639b47a8ce7cf9b71a3cf?d=identicon&s=25 Nuno Magalhães (Guest)
on 2014-06-19 17:53
(Received via mailing list)
On Thu, Jun 19, 2014 at 1:42 AM, Yumi <nginx-forum@nginx.us> wrote:
> If you're uploading large dumps, you may wish to increase the size of
> client_max_body_size

And PHP's post_max_size:
http://pt2.php.net/manual/en/ini.core.php#ini.post-max-size
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.