# 预期第99百分位性能

**URL:** https://meta.discourse.org/t/expected-99th-percentile-performance/111924
**Category:** Support
**Created:** [2019年三月18日 13:36 UTC](https://meta.discourse.org/t/expected-99th-percentile-performance/111924 "2019-03-18T13:36:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2019年三月18日 13:36 UTC](https://meta.discourse.org/t/expected-99th-percentile-performance/111924/1 "2019-03-18T13:36:25Z")

</div>

I have migrated a high-volume site from Hosted to self-hosted for someone else to manage. I would like to provide them with as much information as possible to have them be successful in managing the site. This person is convinced that his hardware is more than sufficient to the task, but the page performance seems to suggest otherwise. I’m not sure whether there is more tuning that I should do or whether the hardware is to blame.

Here are the stats from Prometheus/Grafana:

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/3/235cae58afe08dad5d35c1266f5c40e6992c5a37.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/e/ae59660cd50d40aa7bdf11e021ce6908fad956df.png)

Is there something here that the new manager should be aware of?

Also, what do I do to get Prometheus to feed the container CPU and memory usage to Grafana?

Edit: Maybe this time wasn’t representative. Median performance looks like 200-400ms and 99th percentile is 2-3 seconds.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2019年三月19日 04:27 UTC](https://meta.discourse.org/t/expected-99th-percentile-performance/111924/2 "2019-03-19T04:27:34Z")

</div>

Looking at the graphs it looks like Postgres is choking.

On our hosted installs very busy sites will sit on 99th percentile below 400ms on a bad day.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2019年三月19日 12:18 UTC](https://meta.discourse.org/t/expected-99th-percentile-performance/111924/3 "2019-03-19T12:18:10Z")

</div>

Thanks, Sam.

The database is 30GB on disk. There is reason to believe that the disk is slow. This is with `db_work_mem=90MB` and 10GB for `db_shared_buffers`. There is 24GB of system RAM. My next move is to bump `db_shared_buffers` to 16GB. Does that make sense? Should I bump `db_work_mem` too?

Here’s the past 6 hours:

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/c/acc32aa384bc1753d440261ad675b90b709799dd.png)

Today so far there have been spikes in the 5, 10, and 25 second ranges.

Edit: the site owner is happy with the performance. I remain interested in the answer to the question, but it looks like I’ll leave things as they are.

---

<div class="post-metadata">

### Author: ![trying2survive](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@trying2survive](https://meta.discourse.org/u/trying2survive)
#### Post date: [2021年五月21日 11:14 UTC](https://meta.discourse.org/t/expected-99th-percentile-performance/111924/4 "2021-05-21T11:14:22Z")

</div>

你好，你已经成功让 Prometheus 将容器的 CPU 和内存使用情况上报给 Grafana 了吗？如果是的话，方便分享一下配置吗？谢谢。
