: This article mainly introduces the apc extension of php (III). For more information about PHP tutorials, see. "Host Status Diagrams" and "Detailed Memory Usage and Fragmentation": on the right side of the page, there are some apc-related charts. we can intuitively see the Usage of apc through charts.
Memory Usage: indicates the Memory Usage chart of apc. the chart lists the Memory Usage values and Usage percentages. the green part indicates that Memory Usage is not used, and the red part indicates that Memory Usage is used.
Hits & Misses: Percentage of hit rate cached by apc. the percentage of hit rate is shown in the chart. green indicates hit, and red indicates no hit.
Detailed Memory Usage and Fragmentation: Detailed Memory Usage and Fragmentation. When a piece of data in the cache is cleared, the space occupied by the data is released, and the space is changed to unused space, but there is still data on both sides of the cache, the occupied space is still used. in this way, the unused space is isolated and cannot be connected with other unused spaces. as a result, fragments are generated, as shown in, the unused space of 35 MB is divided into 4 parts. If the size of the new request file is smaller than the size occupied by the fragment, the fragment can be exploited. However, if the requested file is larger than the size occupied by the fragment, the Shard space cannot be used. For example, there are currently two separate 608.0 Bytes of unused space. Now a new 1 KBytes file request, although the two fragments have already exceeded 1 KBytes, however, because the two are not connected together, and each part is insufficient to accommodate new requests, the two parts will be skipped, this request will continue to accommodate its unused space. It can be seen that too many fragments are too small and too fragmented, which is not conducive to the full use of the memory block. there is no good way to solve the fragmentation problem and make rational use of the memory block.
So far, the "View Hosts Stats" page shows all the content, including the basic information of apc, running configuration items, and running status, we can get a lot of information we need from this page, such as the number of caches, cache size, and cache hit rate. This page displays the overall information, to view information about each page or variable, you need to go to the "System Cache Entries" and "User Cache Entries" pages. The next article will detail these two pages.
The above introduces the apc extension analysis of php (III), including some content, and hopes to help friends who are interested in PHP tutorials.