Skip to content

Commit 4710e37

Browse files
Add /book. Fix ambiguous refs. CSS tweak.
1 parent 06b3443 commit 4710e37

7 files changed

Lines changed: 32 additions & 6 deletions

File tree

config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ title = "Hack MySQL"
44
disqusShortname = "hackmongo"
55
copyright = "2024 Daniel Nichter"
66

7+
[services]
8+
[services.disqus]
9+
shortname = 'hackmongo'
10+
711
[params]
812
[params.author]
913
name = 'Daniel Nichter'

content/announcing-finch-mysql-benchmarking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ And it's all extensively documented: https://square.github.io/finch/
166166

167167
Benchmarking is difficult, even for experts.
168168
But ideally it's something software developers can do and actually do.
169-
To help make that reality is another reason why I wrote Finch&mdash;and the page [Benchmarking]({{< ref "benchmarking" >}}).
169+
To help make that reality is another reason why I wrote Finch&mdash;and the page [Benchmarking]({{< ref "eng/benchmarking" >}}).
170170

171171
I've already seen it in action once: where I work, a team of software engineers used Finch to recreate the critical part of their app's workload.
172172
They benchmarked one database environment versus another and found the other had latency the app couldn't handle.

content/book.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
date: "2024-11-09T14:27:00-05:00"
3+
title: "Efficient MySQL Performance In 10 Sentences"
4+
tags: ["mysql", "book"]
5+
---
6+
7+
Don't have time to read [_Efficient MySQL Performance_](https://oreil.ly/efficient-mysql-performance)?
8+
Here's the book (10 chapters) in one-liners.
9+
10+
1. Performance is query response time.
11+
2. Proper left-most indexing is required for performance.
12+
3. The less data, the better.
13+
4. Access patterns (part of the workload) help or hinder performance.
14+
5. Sharding is how to scale writes when single-node performance is truly reached.
15+
6. Server metrics reflect how the app workload causes MySQL to work.
16+
7. Replication lag is data loss.
17+
8. Locks are held until a transaction commits, so commit quickly.
18+
9. There are many other challenges that you might need to address&mdash;sorry.
19+
10. MySQL in the cloud is slower _and_ more expensive, so performance is more important than ever.
20+
21+
22+

content/rand/response-time-slo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ alaises:
88
- /post/response-time-sla/
99
---
1010

11-
Response time [percentiles]({{< ref "percentiles" >}}) are a ubiquitous measure of system performance.
11+
Response time [percentiles]({{< ref "eng/percentiles" >}}) are a ubiquitous measure of system performance.
1212
The P999 (99.9th percentile) is a high bar, so it's a good metric to determine a service level objective (SLO).
1313
For example, my team runs a system with a P999 &leq; 800 millisecond SLO.
1414
The system meets the SLO, but here's its P999 graph:
1515

1616
![Query SLO P999 Chart](/img/query-sla-p999-chart.png)
1717

18-
Looks bad, but the system _is_ meeting the SLO. To understand why, let's look at how percentiles are calculated. The [Percentiles]({{< ref "percentiles" >}}) page on this site is a longer, more technical read about the subject, but for our purposes here the TL;DR is: <mark>a percentile is a high water mark.</mark> Consider a literal high water mark:
18+
Looks bad, but the system _is_ meeting the SLO. To understand why, let's look at how percentiles are calculated. The [Percentiles]({{< ref "eng/percentiles" >}}) page on this site is a longer, more technical read about the subject, but for our purposes here the TL;DR is: <mark>a percentile is a high water mark.</mark> Consider a literal high water mark:
1919

2020
![High water mark (Lake Mead) Source: durangoherald.com](/img/high-water-mark.jpg)
2121

layouts/partials/disqus.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
2-
{{ if .Site.DisqusShortname }}
2+
{{ if .Site.Config.Services.Disqus.Shortname }}
33
<div class="comments">
44
{{ template "_internal/disqus.html" . }}
55
</div>

src/hackmysql.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ h2 + .note {
173173
border-color: red;
174174
text-align: justify;
175175
}
176-
.warn > a { color:black; text-decoration:none; }
176+
.warn > a, a:has(.figure) { color:black; text-decoration:none; }
177177
.left-icon {display:flex; align-items:center;}
178178
.left-icon > img {float:left; margin-right:1rem;}
179179
.note.warn.left-icon {padding-left: 1rem;}

static/hackmysql.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)