Redis vs Valkey performance

Anton Putra
26 Apr 202508:06

Summary

TLDRIn this video, the performance of Redis and Valkey, an open-source fork of Redis, is compared through various tests on virtual machines with single and multi-threaded configurations. The tests measure throughput, latency, CPU usage, memory usage, and network performance. In single-threaded mode, Valkey slightly outperforms Redis, but the most significant difference is observed in multi-threaded tests where Valkey achieves higher throughput and better resource efficiency. The video concludes with a recommendation to switch to Valkey, as it offers better overall performance, is open-source, and has a larger community of contributors.

Takeaways

  • 😀 Redis and Valkey were compared in terms of latency, throughput, CPU usage, memory usage, and network performance.
  • 😀 In the first test with a single CPU, Redis reached 100,000 requests per second, while Valkey was slightly more stable, reaching 107,000 requests per second.
  • 😀 Valkey outperformed Redis in latency, especially when measured with the p90 percentile, in both SET and GET operations.
  • 😀 CPU usage was generally similar between Redis and Valkey, with some spikes, but no major differences.
  • 😀 Memory and network usage were also measured for both databases, revealing no significant differences.
  • 😀 The second test with 4 CPUs highlighted the bigger differences between Redis and Valkey, especially in multithreading performance.
  • 😀 Redis reached 260,000 requests per second when using 4 CPUs, while Valkey achieved 350,000 requests per second, showing a notable performance gap.
  • 😀 Valkey utilizes resources more efficiently than Redis, especially when both were configured to use 4 I/O threads for operations.
  • 😀 In terms of overall performance, Valkey performed better than Redis in all tested areas, including latency and throughput.
  • 😀 Despite Redis having new features like JSON support and time-series databases in version 8.0, Valkey is a better overall option for most users due to its higher performance, open-source nature, and larger contributor community.

Q & A

  • What is the main difference between Redis and Valkey?

    -The main difference is that Valkey is an open-source fork of Redis, and it implements multithreading independently after the fork, unlike Redis which traditionally uses a single-threaded mode for core operations.

  • What tests were conducted to compare Redis and Valkey?

    -Two tests were conducted: one using a virtual machine with a single CPU (single-threaded mode) and another using a virtual machine with 4 CPUs where both databases were configured to use 4 I/O threads.

  • Which database performed better in the single-threaded test?

    -In the single-threaded test (single CPU), Valkey outperformed Redis with slightly better throughput, reaching 107,000 requests per second compared to Redis's 100,000 requests per second.

  • How was latency measured during the tests?

    -Latency was measured from the client side using the p90 percentile, which is a common way to measure response times for 90% of the requests.

  • What was the observed difference in CPU usage between Redis and Valkey?

    -In the single-threaded test, CPU usage was similar for both Redis and Valkey, with some spikes observed. However, in the multi-threaded test (using 4 CPUs), Valkey showed more efficient CPU resource utilization.

  • How did Redis and Valkey compare in terms of memory usage?

    -Memory usage was similar for both Redis and Valkey, with no significant differences observed in the tests.

  • What was the impact of multithreading on performance in the second test?

    -In the second test with 4 CPUs and 4 I/O threads configured, Valkey significantly outperformed Redis, achieving 350,000 requests per second compared to Redis's 260,000 requests per second.

  • What configuration was used for the multi-threaded test?

    -The multi-threaded test used m7a.xlarge instances with 4 CPUs each. Both Redis and Valkey were configured with 4 I/O threads for I/O operations.

  • Why was the presenter convinced to switch from Redis to Valkey?

    -The presenter was convinced to switch to Valkey due to its higher throughput, lower latency, and better resource efficiency (especially CPU usage) in the multi-threaded test.

  • What are the main reasons the presenter gives for switching to Valkey over Redis?

    -The main reasons include Valkey's superior performance in multi-threaded environments, its open-source nature, and its larger community of contributors. The presenter also notes that unless specific Redis 8.0 features like JSON support or time-series databases are needed, Valkey is the better option.

Outlines

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Mindmap

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Keywords

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Highlights

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Transcripts

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant
Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
RedisValkeyDatabasePerformanceLatencyThroughputOpen SourceMultithreadingAWSBenchmarkingTech Comparison
Besoin d'un résumé en anglais ?