Comparison between redis Hash Storage and string storage memory consumption

Source: Internet
Author: User

Storage Object User
String storage method:

SET media:1155315 939  GET media:1155315  > 939

String Structure to store this object

Storage Capacity Memory usage (KB) Usage time (MS) CPU usage
100 30.72 2983  
100 30.72 1224  
100 40.96 2638  
100 40.96 1543  
100 40.96 3335  
4487 1934.62 21760 0.05
4487 1934.59 21732 0.05
       
       

The hash structure stores this object.

HSET "mediabucket:1155" "1155315" "939"  HGET "mediabucket:1155" "1155315"  > "939"

Storage Capacity Memory usage (KB) Usage time (MS) CPU usage
100 367.76 454  
100 37.37 458  
100 50.50 461  
100 40.44 467  
100 35.50 489  

   
     
     
     


4487 1805.1 21729 0.06
4487 1844.23 21712 0.05
4487 1844.23 21778  

Continue hash structure optimization

Similar

HSET "1155" "315" "939"  HGET "1155" "315"  > "939"


Storage Capacity Memory usage (KB) Usage time (MS) CPU usage
100 367.76 454  
100 37.37 458  
100 50.50 461  
100 40.44 467  
100 35.50 489  
4487 1803.29 21879 0.06
4487 1842.43 21931 0.05
       


References:

Http://www.searchdatabase.com.cn/showcontent_54724.htm

Memory saving: Instagram redis practices

Comparison between redis Hash Storage and string storage memory consumption

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.