Redis and Mamcatch differences

Source: Internet
Author: User
Several features of Redis
1, Redis uses a single-threaded IO multiplexing model, which encapsulates a simple Aeevent event processing framework, mainly implements the Epoll, Kqueue and select, for only IO operation, single-threaded can be used to maximize the speed advantage, However, Redis also provides some simple computing functions, such as sorting, aggregation, etc., for these operations, the single-threaded model can actually seriously affect the overall throughput, CPU calculation process, the entire IO schedule is blocked.
2, Redis uses on-site memory to store data, and rarely use free-list and other ways to optimize memory allocation, there will be a certain degree of memory fragmentation, Redis and according to the storage command parameters, the data with the expiration time is stored separately, and call them temporary data, Non-temporary data is never removed, even if there is not enough physical memory, so that swap will not eliminate any non-temporal data (but will attempt to eliminate some temporary data), which is more appropriate for Redis as storage instead of the cache.
Memcached uses a pre-allocated pool of memory to manage memory using slab and chunk of different sizes, item selects the appropriate chunk storage based on size, the way memory pools can save the cost of requesting/freeing memory, and can reduce memory fragmentation, But this approach also leads to a degree of wasted space, and when memory is still large, new data may be removed;
3, Redis provides the function of the transaction, can guarantee the atomicity of a sequence of commands, the middle will not be interrupted by any action.
4, Redis In addition to Key/value, but also support list,set,sorted Set,hash and many other data structures, provided the keys for enumeration operations, but not online, if you need to enumerate the data on the line, Redis provides tools to scan its dump files, enumerate all the data, and Redis also provides features such as persistence and replication.

Redis and Mamcatch differences

Related Article

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.