Discussion on how to analyze the internal state _php skills of memcached by stats command

Source: Internet
Author: User
Tags memcached serialization
MemcachedHave a Statscommand, which allows you to view a number of status information for the memcached service. use the following methods:
The status information for the current memcached service is displayed by entering the Telnet hostname port number directly on the command line, connecting to the memcached server, and then entering the stats command when the connection succeeds.
For example in my native test is as follows:
Stats
STAT PID 1552
STAT Uptime 3792
STAT Time 1262517674
STAT version 1.2.6
STAT Pointer_size 32
STAT Curr_items 1
STAT Total_items 2
STAT bytes 593
STAT Curr_connections 2
STAT Total_connections 28
STAT Connection_structures 9
STAT Cmd_get 3
STAT Cmd_set 2
STAT Get_hits 2
STAT get_misses 1
STAT Evictions 0
STAT Bytes_read 1284
STAT Bytes_written 5362
STAT limit_maxbytes 67108864
STAT Threads 1
End
This shows a lot of state information, which explains each status item in detail:
1. Process ID of the pid:memcached service process
2. uptime:memcached service from boot to the current elapsed time, in seconds.
3. time:memcached the current system time of the host server, in seconds.
4. Version of the version:memcached component. This is the 1.2.6 I currently use.
5. Pointer_size: The server host operating system pointer size, typically 32 or 64.
6. Curr_items: Represents the number of all cached objects that are stored in the current cache. Does not include objects that are currently deleted from the cache.
7. Total_items: Indicates the number of all objects that the system has stored, including objects that have been removed from the cache, from the start of the Memcached service to the current time.
8. Bytes: Represents the storage space used by the system to store cached objects in bytes.
9. Curr_connections: Represents the number of connections currently open on the system.
Total_connections: Represents the total number of connections that the system has opened since the Memcached service was started to the current time.
Connection_structures: Indicates the number of connection structures assigned by the server from the start of the Memcached service to the current time, and this explanation is given by the Protocol document, and I'm not sure what it means at the moment.
Cmd_get: The amount of cumulative fetch data, here is 3, because I tested 3 times, the first time because there was no serialization of objects, so get data failed, is NULL, there are 2 times I tested with different objects 2 times.
Cmd_set: The cumulative number of saved data, here is 2. Although I have stored 3 times, the first time because there is no serialization, so did not save to the cache, there is no record.
Get_hits: The number of times that the data was successfully obtained.
Get_misses: The number of times that the data failed to get.
Evictions: The number of cached objects removed from the cache in order to free up space for new data items. For example, objects that are removed according to the LRU algorithm when the cache size is exceeded, and objects that expire.
The total number of bytes read by the bytes_read:memcached server from the network.
The total number of bytes sent to the network by the bytes_written:memcached server.
The maximum number of bytes that the Limit_maxbytes:memcached service cache allows to use. This is 67108864 bytes, which is 64M. Match the size of our startup memcached service settings.
Threads: The total number of worker threads being requested. This explanation is given in the agreement document, and what it means, I don't know yet.
Summary: The Stats command is useful in general, and through this command we are aware of all aspects of the current memcached service.

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.