Impact of memory size in Nginx cache on Performance Testing

Source: Internet
Author: User

Phenomenon: Both Nginx and applications are on the same server (4 GB memory and 4-core cpu). The nginx cache memory is configured as 1 GB, nginx accesslog is enabled, and the performance script of the Image Terminal page is run, it is observed that there are more than 90% misoperations in the accesslog, And the nginx cache does not play a role. It increases the nginx cache memory to 2 GB and clears the cache to run the performance script again, the MISS status in accesslog still accounts for the majority, and the memory space of the application server is basically used up.

Solution: Separate nginx from the application, place nginx on one server, move the application package to another server (6 GB memory, 8-core cpu), and run the script on the Image Terminal page, the nginx cache memory is configured with 2 GB, and the response has been raised. The HIT status in accesslog accounts for 90% or more. It indicates that the nginx cache zone plays a role.

The main reason is that the nginx cache zone is not enough when it is set to 1 GB. When it is adjusted to 2 GB, the 2 GB memory configured by nginx does not work because the server also stores applications in the memory and the system also needs resources. When nginx and the application are separated, the resources are sufficient, and the nginx cache can also play a role.

Nginx details: click here
Nginx: click here

Deployment of Nginx + MySQL + PHP in CentOS 6.2

Build a WEB server using Nginx

Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5

Performance Tuning for Nginx in CentOS 6.3

Configure Nginx to load the ngx_pagespeed module in CentOS 6.3

Install and configure Nginx + Pcre + php-fpm in CentOS 6.4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.