WordPress knowledge sharing

Initial experience of using Opcache cache visualization monitoring script opcache status

The Weiss blog has repeatedly emphasized the effect and role of opcache acceleration in the php environment. opcache is an official script developed by php to accelerate from the bottom of the php environment (after php 5.5). You must enable this free but effective tool, which is absolutely twice the result with half the effort. Lao Wei has always wanted to find a model Opcache visual monitoring script , I came across a useful script today opcache status You can visually view the opcache acceleration results, share the installation and experience process, and provide reference for everyone.

At present, the military brother lnmp, oneinstock and pagoda panels do not provide a visual opcache monitoring interface, which is a pity. Since there is such a convenient visual monitoring script, let's try it.

Related articles: Lnmp Enable Opcache Script Cache to Improve PHP Performance

One click expansion installation of pagoda panel ionCube/fileinfo/memcached/redis/Opcache

The first related article above is used for command line lnmp, such as military brother lnmp and oneinstock.

1、 Installation and experience of opcache status

1. Download address https://github.com/rlerdorf/opcache-status

2. Click the above page, click the green download button, and then click download zip to start downloading.

3. Unzip the downloaded compressed package and upload the folder to the root directory of the website.

4. Add a folder name after the website domain name. For example, Lao Wei named the folder opcache. The path to open the monitoring page is the domain name/opcache/opcache.php

5. This monitoring script must be deleted if you have played enough! Delete! Delete! The reason is that this thing is open source code, and there is no malicious code in itself. What I fear is that it will affect website security after being used. When maintaining the server, we should start with details to avoid being caught.

2、 Initial experience of opcache status

In the face of this full article of English, Old Wei has a big head. With half a dozen English basics and online translation, you can probably understand it. Anyway, it is just a casual play, and you don't need to be too serious about the specific meaning of each word.

Status: opcache cache usage, surplus, memory waste and proportion;

Configuration: opcache settings;

Scripts: Cache scripts. Maybe this is the understanding. Please correct any mistakes;

Visualise partition: Visualize partition. Here, Lao Wei has never understood. Maybe he told you which files or folders were cached? Please leave a message and let me know if you understand. Thank you!

The following figure can be seen on the right side of the page. 128M of available memory is set. Memory, a red, yellow and blue chart, indicates used memory (red), free memory (green), and wasted memory (yellow). The first two points are easy to understand. I don't understand what this waste of memory means.

There are cached keys and the number of remaining keys in the keys on the right;

Hits is the number of cache hits (green) and misses (red);

Restarts. It's not important to know what it is used for. It's not used anyway.

Finally, Lao Wei saw that the opcache_hit_rate of this site, that is, the cache hit rate is 100%, probably because the number of hits is too many (more than 50 million), and the number of misses (1776) is too small to be considered.

The above is the experience process of this opcache status script. Our focus is on the number of hits, misses and hit rates. Interested friends can figure out the meaning of each item on their own. Generally speaking, we only use it to understand the effect of using opcache on websites. If there are problems, we can improve them.

On the whole, the hit rate is quite high. For websites like this, user access is instant. With CDN acceleration, the website can be opened very quickly. The last important thing is to say again, this script is only used to view the current status of opcache. When you have played enough, it will be deleted, leaving no tail or future trouble.

Like( two )
Article name: Initial Experience of Using Opcache Status Visual Monitoring Script for Opcache Cache
Article link: https://www.vpsss.net/15887.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.