We started, start with Free command start. free relative to the top command provides a more concise view of the system memory usage: $ free total used free shared buffers cached Mem: 255268 238332 woodbury outlet new york 16936 0 85540 126384 - / + buffers / cache: 26408 228860 Swap: 265000 0 265000 Mem: represent physical Memory statistics - / + buffers / cached: represents the physical memory cache statistics Swap: swap partition on the hard disk indicates usage, here we do not care. System's total physical memory: 255268Kb (256M), but the system is currently available real memory b is not the first line of free labeled 16936Kb, it only represents unallocated memory. We use total1, used1, woodbury outlet new york free1, used2, free2 other names to represent the values of the above statistics, 1,2, respectively, represent the first and second rows of data. total1: indicates the total physical memory. used1: indicates total allocated to the cache (including buffers and cache) the quantity used, but which may be part of the cache does not actually use. free1: not allocated memory. woodbury outlet new york shared1: shared memory, the general system will not be used, nor discussed here. buffers1: the system of buffers allocated but unused number. cached1: System cache allocated but unused number. See the difference between buffer and cache behind. used2: the actual use of buffers and cache volume, but also the actual amount of memory used. free2: unused buffers and cache and not the sum of the allocated memory, which is the current system the actual available memory. You can sort out the following equation: total1 = used1 + free1 = used2 + free2 used1 = buffers1 + cached1 + used2
free2 = buffers1 + cached1 + free1 buffer and cache difference A buffer is something that has yet to be "written" to disk. A cache is something that has been "read" from the disk and stored for later use. A more detailed explanation Reference: Difference Between Buffer woodbury outlet new york and Cache for shared memory (Shared memory), mainly used in the UNIX environment to share data between different processes, is a method of interprocess woodbury outlet new york communication, the general application does not apply to use shared memory, the author there is no shared memory to verify the impact of the above equation. If you are interested, please refer to: What is Shared Memory? Cache and buffer the difference: Cache: Cache is located between the CPU and main memory woodbury outlet new york capacity of a small but very high speed memory. Since the CPU is faster than main memory, CPU accesses data directly from memory to wait for a certain time period, Cache CPU just used to save a portion of the data used or recycled, re-used when the CPU when the part of the data from the Cache called directly, thus reducing the CPU wait time, improve the system's efficiency. Cache is divided into a Cache (L1 Cache) and two Cache (L2 Cache), L1 Cache integrated inside the CPU, L2 Cache early general is soldered on the motherboard, but now they are integrated inside the CPU, the common capacity of 256KB or 512KB L2 Cache. Buffer: buffer, and a speed is not synchronized for storing different priority devices or transfer data between devices area. Through the buffer zone, so that the process can be between the waiting is reduced, so that the device from a slow read data, the operation of the device fast continuous process does not occur. Free the buffer and cache: (they are all occupied memory): buffer: a buffer cache memory is a block device to read and write buffer cache: as page cache memory, file system cache if the cache's value is large, Description cache living document number many. If frequent access to the file cache can be live, then read the disk IO will be very small.
No comments:
Post a Comment