tmux · Advanced · tmux-pro logging: what separates "readable" from "usable"

1.1K
TMr/tmux-pro·posted by zhu_zong·just nowInternals

tmux-pro logging: what separates "readable" from "usable"

Short version: tmux-pro needs almost no tuning at small and medium scale — the point where it starts to hurt is much further out than most people assume. Full measurements below.

We also fixed monitoring along the way: replaced average-based alerts with percentiles and split them per endpoint. False alerts dropped by about seventy percent and the on-call rotation visibly cheered up.

Keep it and wait for an official fix44%
Switch to a third-party option now28%
Fork and maintain it ourselves17%
Write an adapter layer and wait11%

1841 votes total

441 comments

441 comments

· first 120 loaded
M
Ddev_zhou·3 minutes ago

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

502
Rran_bo·2 days agoedited

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

497
Sslow_query·2 days ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

487
Nnikic·2 days ago

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

457
Cchen_dev·just nowedited

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

379
Ttang_hao·12 minutes ago

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

264
Ttang_haoOP·3 minutes ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

64
Oops_wang·12 minutes ago

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

369
Ddev_zhouOP·just now

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

280
Cchen_dev·2 days ago

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

260
Rrase·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

16
Rrase·12 minutes ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

8
Kkernel_panic·2 days ago

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

9
Ttang_hao·3 minutes agoedited

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

202
Ddev_zhou·2 days ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

186
Sslow_query·2 days agoLevel 6

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

5
Hhuang_ke·just now

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

136
Ddev_zhou·28 minutes ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

458
Kkernel_panic·2 days ago

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

206
Hhuang_ke·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

208
Ddev_zhou·2 days agoedited

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

78
Rrase·2 days agoedited

Saved. I am reworking this area this week — this saves a lot of wrong turns.

2
Zzhou_yi·2 days ago

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

363
Zzhu_zong·2 days ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

340
Mmike_xuOP·just now

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

264
Zzhou_yi·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

284
Aalice_dev·28 minutes ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

232
Bbob_chen·2 days ago

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

220
Mmike_xu·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

204
Aalice_dev·yesterday

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

1
Aalice_dev·2 days agoedited

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

86
Nnikic·2 hours ago

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

188
Lli_mingOP·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

517
Wwinter·2 days ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

187
Rran_bo·2 days agoedited

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

423
Rrase·2 days ago

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

180
Sslow_query·2 days ago

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

164
Hhuang_ke·2 days ago

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

168
Sswoole_lee·2 days ago

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

141
Llinlin·2 days ago

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

226
Zzhou_yi·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

150
Nnikic·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

134
Ttang_haoMod·2 days ago

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

123
Aalice_dev·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

82
Rrase·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

80
Ttang_hao·yesterday

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

71
Oops_wang·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

56
Rran_bo·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

52
Oops_wang·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

42
Rran_bo·12 minutes agoedited

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

108
Sswoole_leeOP·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

262
Cchen_dev·2 days agoedited

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

459
Wwinter·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

468
Kkite·28 minutes ago

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

413
Mmike_xuOPMod·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

15
Llinlin·2 days agoedited

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

57
Aalice_dev·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

12
Mmike_xu·12 minutes ago

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

17
Hhuang_ke·2 days ago

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

14
Kkernel_panicMod·2 days ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

233
Bbob_chen·5 hours ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

4
Aalice_dev·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

54
Oops_wang·2 days ago

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

279
Kkernel_panic·2 days ago

Agreeing with the above. One addition: with this option enabled the GC count in your metrics doubles, so adjust the alert threshold at the same time or it will keep firing.

47
Ddev_zhouMod·2 days ago

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

1
Kkernel_panic·2 days ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

328
Rran_bo·2 days ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

276
Kkernel_panicOP·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

126
Lli_ming·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

63
Sslow_query·2 hours ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

42
Zzhou_yi·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

8
Ttang_hao·5 hours agoedited

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

38
Ddev_zhou·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

37
Sslow_query·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

151
Kkite·2 days ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

3
Mmike_xu·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

28
Hhuang_ke·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

20
Sswoole_lee·2 days agoedited

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

1
Llinlin·just now

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

414
Mmike_xu·2 days ago

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

28
Kkernel_panic·12 minutes ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

17
Ttang_hao·12 minutes ago

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

498
Bbob_chen·2 days ago

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

17
Kkernel_panic·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

512
Ttang_hao·2 hours ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

12
Kkernel_panic·12 minutes ago

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

5
Bbob_chen·2 days ago

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

12
Aalice_dev·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

12
Zzhu_zong·3 minutes ago

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

10
Oops_wang·2 days ago

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

40
Rrase·2 days ago

Has anyone run a controlled experiment? I did, reducing it to a single variable, and the difference was 4% — within noise. So I suspect the main cause is something else.

375
Kkite·2 days ago

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

416
Wwinter·2 days ago

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

6
Ttang_hao·2 days ago

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

77
Mmike_xu·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

3
Zzhu_zong·2 days ago

Thanks for sharing real numbers — far more useful than the articles that only cover concepts.

234
Sswoole_lee·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

15
Zzhou_yi·2 days agoedited

I see point 3 differently. The trade-off depends on your read/write ratio: read-heavy with little writing means caching actually widens the inconsistency window.

110
Kkite·2 days ago

Worth learning from this debugging approach. We went straight at the logs and took a much longer route.

7
Nnikic·5 hours ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

2
Hhuang_ke·2 days ago

One counter-example: below tmux-pro 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

60
Hhuang_ke·yesterday

Saved. I am reworking this area this week — this saves a lot of wrong turns.

53
Rrase·2 days agoedited

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

91
Aalice_dev·just nowedited

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

79
KkiteMod·2 days ago

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

398
Zzhu_zong·2 days agoLevel 6

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

373
Hhuang_ke·2 days agoLevel 6

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

54
Hhuang_ke·2 days ago

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

111
Ddev_zhou·2 days ago

Sharing our numbers, 8 cores 16GB, same scenario:

| Concurrency | P50 | P99 |
|---|---|---|
| 200 | 12ms | 88ms |
| 500 | 31ms | 340ms |

P99 clearly collapses at 500 concurrency, which lines up with your knee point.

13
Sswoole_lee·2 days ago

I just read the tmux-pro source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

38
Rrase·just now

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

349
Zzhu_zong·2 days ago

This is not a tmux-pro problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

178
Oops_wang·just now

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

337
Hhuang_ke·2 days ago

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

167
Hhuang_ke·2 days ago

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

176
Bbob_chen·2 days ago

There is actually a simpler fix that needs no architecture change: move this check up to the gateway and the problem disappears. The cost is one extra lookup at the gateway.

66
Nnikic·2 days ago

A question: what changes in a container with a 512Mi memory limit? That is how we run it in production.

42
Kkite·2 days ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

1
Cchen_dev·2 days ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

1
Oops_wang·2 days ago

This matches what we see in production. We only hit it past 3k QPS; the earlier load tests showed nothing — the test traffic was too clean, with no long-tail requests.

1

This is the post detail page /en/c/tmux-pro/post/p8. Posts and comments are generated deterministically from a seeded PRNG, so the same post always renders the same content and the link can be shared, reloaded and indexed. In production this page reads MySQL for the post, Redis for hot-post caching, and fetches the whole comment tree in a single query on the path column.

See the database schema →