<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb" -->

---
title: Valkey · How Valkey 8.1 Handles 50 Million Sorted Set...
description: A benchmark comparing Valkey 8.1 against Valkey 8.0 shows the redesigned hash table in 8.1 cuts memory usage significantly when inserting 50 million members...
canonical: https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Valkey · How Valkey 8.1 Handles 50 Million Sorted Set Inserts | daily.dev
og:description: A benchmark comparing Valkey 8.1 against Valkey 8.0 shows the redesigned hash table in 8.1 cuts memory usage significantly when inserting 50 million members...
og:url: https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb
og:image: https://api.daily.dev/og/posts/5VKUep3hB.png
og:image:alt: Valkey · How Valkey 8.1 Handles 50 Million Sorted Set Inserts
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Valkey · How Valkey 8.1 Handles 50 Million Sorted Set Inserts

**[Valkey](https://daily.dev/sources/valkey-blog)** · 6 min read · 0 upvotes · 0 comments

## Summary

A benchmark comparing Valkey 8.1 against Valkey 8.0 shows the redesigned hash table in 8.1 cuts memory usage significantly when inserting 50 million members into a sorted set. Memory savings reached about 27% at 10 million inserts and 22% at 50 million inserts (3.77 GB vs 4.83 GB), while throughput improved roughly 7-8%, with total insert time dropping from 94 to 87 seconds. The results, produced by Momento (which runs Valkey for Raider.IO's WoW leaderboards), align with Valkey's own release notes claiming up to 20% lower per-key overhead. The benchmark code is open sourced for reproduction.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://valkey.io/blog/50-million-zsets>

## Questions this post answers

### How much memory does Valkey 8.1 save compared to Valkey 8.0 for large sorted sets?

Valkey 8.1 uses roughly 20-27% less memory than Valkey 8.0 for large sorted sets due to a redesigned hash table that cuts about 20-30 bytes of per-key overhead. In a benchmark inserting 50 million members into a ZSET, Valkey 8.1 used 3.77 GB versus 4.83 GB for Valkey 8.0, a savings of about 1.06 GB (22%), with the gap reaching 27% at the 10 million insert mark.

_Teams sizing cache nodes around Valkey memory usage can track version-specific benchmarks like this on daily.dev._

### Does upgrading to Valkey 8.1 improve insert throughput for sorted sets?

Yes, Valkey 8.1 delivers higher and more consistent throughput than Valkey 8.0 when inserting large sorted sets. In a 50-million-member ZSET benchmark, Valkey 8.1 finished at 573k inserts per second compared to 532k/s for Valkey 8.0, and completed the full workload in 87 seconds versus 94 seconds, a roughly 7-8% improvement with a smoother performance curve.

_Engineers planning capacity around throughput changes can follow real-world Valkey benchmarks on daily.dev._

### What causes Valkey 8.1's lower memory usage compared to previous versions?

Valkey 8.1 introduces a redesigned dictionary and hash table structure that reduces per-key overhead by approximately 20-30 bytes, or around 20 bytes per key-value pair out of a typical 100 bytes consumed per pair. These savings compound at scale, producing measurable reductions in used_memory when workloads like sorted sets grow into the tens of millions of entries.

_Developers evaluating in-memory data stores for hyperscale workloads can compare release-driven changes on daily.dev._

## Similar posts on daily.dev

- [Valkey Memory Optimization, Version by Version and Encoding: How Many Bytes Did Each Release Actually Save?](https://daily.dev/posts/valkey-memory-optimization-version-by-version-and-encoding-how-many-bytes-did-each-release-actuall-5irzo7vsj) · Percona Blog · 1 upvotes · 0 comments
- [Valkey 9.0 Introduces Multi-Database Clustering, Atomic Slot Migration, and Major Performance Gains](https://daily.dev/posts/valkey-9-0-introduces-multi-database-clustering-atomic-slot-migration-and-major-performance-gains-2gkxrlley) · InfoQ · 7 upvotes · 0 comments
- [Valkey · Reducing Memory Overhead in Valkey 9.1](https://daily.dev/posts/valkey-reducing-memory-overhead-in-valkey-9-1-71iizc4rp) · Valkey · 10 upvotes · 0 comments
- [Valkey 9.1 Delivers More Performance & Enhanced Security](https://daily.dev/posts/valkey-9-1-delivers-more-performance-enhanced-security-9lzgcvzst) · Phoronix · 0 upvotes · 0 comments
- [Announcing Valkey 9.1 for Amazon ElastiCache](https://daily.dev/posts/announcing-valkey-9-1-for-amazon-elasticache-pvemznhnh) · AWS Database Blog · 0 upvotes · 0 comments

---

Tags: [#backend](https://daily.dev/tags/backend), [#redis](https://daily.dev/tags/redis), [#valkey](https://daily.dev/tags/valkey)

[View this post on daily.dev](https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Valkey · How Valkey 8.1 Handles 50 Million Sorted Set Inserts","url":"https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb"},"datePublished":"2026-08-23T12:23:14.453Z","dateModified":"2026-08-23T12:56:23.644Z","description":"A benchmark comparing Valkey 8.1 against Valkey 8.0 shows the redesigned hash table in 8.1 cuts memory usage significantly when inserting 50 million members...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"Valkey","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Valkey","logo":"https://media.daily.dev/image/upload/s--XXPzEmD8--/f_auto,q_auto/v1787487496/logos/valkey-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/valkey-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"backend,redis,valkey","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Valkey","item":"https://daily.dev/sources/valkey-blog"},{"@type":"ListItem","position":3,"name":"Valkey · How Valkey 8.1 Handles 50 Million Sorted Set Inserts"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/valkey-how-valkey-8-1-handles-50-million-sorted-set-inserts-5vkuep3hb#faq","mainEntity":[{"@type":"Question","name":"How much memory does Valkey 8.1 save compared to Valkey 8.0 for large sorted sets?","acceptedAnswer":{"@type":"Answer","text":"Valkey 8.1 uses roughly 20-27% less memory than Valkey 8.0 for large sorted sets due to a redesigned hash table that cuts about 20-30 bytes of per-key overhead. In a benchmark inserting 50 million members into a ZSET, Valkey 8.1 used 3.77 GB versus 4.83 GB for Valkey 8.0, a savings of about 1.06 GB (22%), with the gap reaching 27% at the 10 million insert mark. Teams sizing cache nodes around Valkey memory usage can track version-specific benchmarks like this on daily.dev."}},{"@type":"Question","name":"Does upgrading to Valkey 8.1 improve insert throughput for sorted sets?","acceptedAnswer":{"@type":"Answer","text":"Yes, Valkey 8.1 delivers higher and more consistent throughput than Valkey 8.0 when inserting large sorted sets. In a 50-million-member ZSET benchmark, Valkey 8.1 finished at 573k inserts per second compared to 532k/s for Valkey 8.0, and completed the full workload in 87 seconds versus 94 seconds, a roughly 7-8% improvement with a smoother performance curve. Engineers planning capacity around throughput changes can follow real-world Valkey benchmarks on daily.dev."}},{"@type":"Question","name":"What causes Valkey 8.1's lower memory usage compared to previous versions?","acceptedAnswer":{"@type":"Answer","text":"Valkey 8.1 introduces a redesigned dictionary and hash table structure that reduces per-key overhead by approximately 20-30 bytes, or around 20 bytes per key-value pair out of a typical 100 bytes consumed per pair. These savings compound at scale, producing measurable reductions in used_memory when workloads like sorted sets grow into the tens of millions of entries. Developers evaluating in-memory data stores for hyperscale workloads can compare release-driven changes on daily.dev."}}]}
```

