You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker: allow tmpfs on Mac/Windows; use smaller redo logs
This commit makes two performance improvements affecting workspace=docker, as
well as Skeema's integration test suites:
* Previously, when using docker-cleanup=destroy, the container would use a
tmpfs mount automatically only on a native Linux host. This was due to a
common misinterpretation of the Docker docs; tmpfs actually is also usable
on Docker Desktop for MacOS or Windows. This is now fixed, and likewise for
a few integration tests which can now leverage tmpfs on any host OS.
* InnoDB redo logs for new containers are now set to their minimum allowed
value of 4mb. Ordinarily, this could be problematic on MySQL 8+ even for a
DDL-only workload on throwaway ephemeral container, because DDL in MySQL 8+
writes to the InnoDB-based data dictionary. However, this is now doable
because the previous commit ca85df7 disables redo logging in MySQL 8+ for
Skeema's workspace containers and integration test containers. Meanwhile,
MySQL 5.x and MariaDB (any version) use frm files, so Skeema's DDL
workload won't be constrained by a tiny redo log.
The second change is primarily included here because it reduces memory usage
when operating on tmpfs from the first change.
Copy file name to clipboardExpand all lines: internal/tengo/docker.go
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@ import (
8
8
"log"
9
9
"os"
10
10
"os/exec"
11
-
"runtime"
12
11
"strconv"
13
12
"strings"
14
13
"time"
@@ -82,7 +81,7 @@ type DockerizedInstanceOptions struct {
82
81
83
82
// Options that only affect new container creation:
84
83
DataBindMountstring// Host path to bind-mount as /var/lib/mysql in container
85
-
DataTmpfsbool// Use tmpfs for /var/lib/mysql. Only used if no DataBindMount, runtime.GOOS is Linux, and image is from a top-level repo (e.g. "foo" but not "foo/bar")
84
+
DataTmpfsbool// Use tmpfs for /var/lib/mysql. Only used if no DataBindMount, and image is from a top-level repo (e.g. "foo" but not "foo/bar")
86
85
EnableBinlogbool// Enable or disable binary log in database server
87
86
LowerCaseTableNamesuint8// lower_case_table_names setting (0, 1, or 2) in database server
0 commit comments