# "Your Redis network connection is performing extremely poorly"

**URL:** <https://meta.discourse.org/t/your-redis-network-connection-is-performing-extremely-poorly/342166>\
**Category:** Self-hosting\
**Created:** [December 12, 2024, 10:26pm UTC](https://meta.discourse.org/t/your-redis-network-connection-is-performing-extremely-poorly/342166 "2024-12-12T22:26:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![markersocial](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markersocial/32/170136_2.png) [@markersocial](https://meta.discourse.org/u/markersocial)\
**Post date:** [December 12, 2024, 10:26pm UTC](https://meta.discourse.org/t/your-redis-network-connection-is-performing-extremely-poorly/342166/1 "2024-12-12T22:26:44Z")

</div>

I am consistently getting this in the logs - with values between ~100k to ~1.35m - but the readings near 100k seem to be quite common:

`Your Redis network connection is performing extremely poorly. Last RTT readings were [97069, 103986, 98459, 100762, 381617], ideally these should be < 1000. Ensure Redis is running in the same AZ or datacenter as Sidekiq. If these values are close to 100,000, that means your Sidekiq process may be CPU-saturated; reduce your concurrency and/or see https://github.com/mperham/sidekiq/discussions/5039`

This indicates that perhaps Redis isn’t able to use enough CPU? There seems to be plenty of breathing room for CPU and ram on the server itself though.

also:  
`Sidekiq is consuming too much memory (using: 3570.19M) for 'www.example.com', restarting`

This is using the all in one app.yml with Discourse stable 3.3.2.

From the app.yml:

```plaintext
UNICORN_SIDEKIQS: 9
DISCOURSE_SIDEKIQ_WORKERS: 5

```

I added this configuration to the host also:

> [@MKJ's Opinionated Discourse Deployment Configuration](https://meta.discourse.org/t/mkjs-opinionated-discourse-deployment-configuration/193355/1):
>
> ## Kernel configuration
> 
> Redis (one of the key components on which Discourse is built) [strongly recommends disabling transparent huge pages when using on-disk persistence](https://redis.io/docs/management/optimization/latency/#latency-induced-by-transparent-huge-pages) (which Discourse does), and I also allow memory overcommit.
> 
> ```plaintext
> echo 'sys.kernel.mm.transparent_hugepage.enabled=never' > /etc/sysctl.d/10-huge-pages.conf
> echo 'vm.overcommit_memory=1' > /etc/sysctl.d/90-vm_overcommit_memory.conf
> sysctl --system
> 
> ```

Sidekiq dashboard info:

 ![Screenshot 2024-12-13 at 04.47.36](https://global.discourse-cdn.com/meta/original/4X/d/1/7/d17be8ac26b39b5fc8c165f67618fbd4c86924a9.jpeg)  
 ![Screenshot 2024-12-13 at 05.04.20](https://global.discourse-cdn.com/meta/original/4X/f/0/5/f05530bf3143f8616349878d5cb0ff53463c50dc.jpeg)

It does seem like Redis is not able to surpass 1024M memory usage.

If anyone has any ideas, I’d appreciate it! :meow_heart:

---

_[View the full topic](https://meta.discourse.org/t/your-redis-network-connection-is-performing-extremely-poorly/342166)._
