Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

Best Django Redis configuration for speed and size

Дата публикации: 27-07-2026 03:50:02

`lzma` compresses the most and `zlib` is about as fast as `zstd` in `django_redis` as compressor.

Основное содержимое страницы с новостью.

In 2017 I wrote "Fastest Redis configuration for Django". Now, I've made an update for 2026 that focuses on comparing default Redis with three compressors:

  • zlib
  • lzma
  • zstd

The results on macOS are:

                        TIMES        AVERAGE   MEDIAN (P50)   MEDIAN (P90)         STDDEV
default                    198        0.181ms        0.176ms        0.216ms        0.038ms
zlib                       213        0.190ms        0.182ms        0.237ms        0.039ms
lzma                       134        0.273ms        0.272ms        0.332ms        0.042ms
zstd                       202        0.192ms        0.180ms        0.243ms        0.046ms

Best Means (shorter better)
###############################################################################
█████████████████████████████████████████                        0.181  default
███████████████████████████████████████████                      0.190  zlib
███████████████████████████████████████████████████████████████  0.273  lzma
████████████████████████████████████████████                     0.192  zstd

Best Medians (shorter better)
###############################################################################
████████████████████████████████████████                         0.176  default
██████████████████████████████████████████                       0.182  zlib
███████████████████████████████████████████████████████████████  0.272  lzma
█████████████████████████████████████████                        0.180  zstd

Size of Data Saved (shorter better)
###############################################################################
████████████████████████████████████████████████████████████████  5151  default
██████████████████████████                                        2151  zlib
█████████████████                                                 1420  lzma
████████████████████████                                          2010  zstd

Size of Data without Default (shorter better)
###############################################################################
███████████████████████████████████████████████████████████████████  2151  zlib
████████████████████████████████████████████                         1420  lzma
██████████████████████████████████████████████████████████████       2010  zstd

The "conclusion", on macOS, is that lzma is slowest but compresses the best. On Ubuntu (in GitHub Actions), the fastest of the compressors is zstd and the best compression is lzma.

But it's a very small difference.

The type of data you store in Redis will matter for your use case. In this experiment, it's storing strings of numbers. Each number is about 10 characters long.

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Text Classification With Python 3.14’s zstd Module08.4614-02-2026
2django-query-doctor: Diagnose Slow Django Queries03002-08-2026
3django-orm-lens: Django Schema Review03510-08-2026
4DOOM in Django: testing the limits of LiveView at 600.000 divs/seconds016.5103-01-2026
5redis - 8.1.0015.6230-07-2026
6Django ORM ломается не там, где вы смотрели: шесть ошибок07.7602-08-2026
7Django: release code words up to 6.1022.528-07-2026
8django-crawl - An in-process site crawler using Django’s test client028.1828-07-2026
9Django - 5.2.17028.1804-08-2026
10Verwendung schwacher Verschlüsselung in rest (Red Hat)01028-07-2026

Классификация: . Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 7.66. Источник: pythondigest.ru.