Also document the snapshot cleanup: older round snapshots are removed during sync, and `cephmig cleanup` removes the rest after the cutover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
101 lines
4.9 KiB
Markdown
101 lines
4.9 KiB
Markdown
# Local one-million-file test with snapshots
|
||
|
||
## Result of 2026-11-06/07
|
||
|
||
**PASS**, completed on 2026-11-07 at 01:58:57 CET. The job reached
|
||
`ready-for-cutover`. The independent check confirmed the current target state
|
||
and four snapshots: a total of **5,000,500 regular file paths**, plus
|
||
symlinks, directories, owners, modes, ACLs, xattrs, quotas and snapshot user
|
||
metadata. Another subvolume stayed writable with 14,640 confirmed writes.
|
||
|
||
| Phase including internal checks | Duration | Payload written | MDS requests, both clusters |
|
||
|---|---:|---:|---:|
|
||
| Initial round, existing and new snapshot | 5 h 01 min 11 s | 128,000,000 bytes | 40,451,000 |
|
||
| Catch-up round | 1 h 12 min 13 s | 6,400,128 bytes | 16,875,108 |
|
||
| Finalization, unchanged source | 1 h 20 min 24 s | 0 bytes | 19,259,091 |
|
||
|
||
The first full copy including the final inventory and metadata work took
|
||
about 1 h 40 min; the first full verification of the live target afterwards
|
||
about 1 h 21 min. The whole test scenario including data generation, changes
|
||
and independent verification took 9 h 04 min 37 s. Maximum sampled RSS of
|
||
the Go process across the three phases: 646.2 MiB. The raw measurements are
|
||
in [million-local.json](million-local.json).
|
||
|
||
The full metadata passes remain expensive: even the finalization without any
|
||
payload changes caused about 19.3 million MDS requests. The verification
|
||
path is currently serial. During the run, Ceph also reported slow BlueStore
|
||
operations and a high BlueFS share on the small test OSDs. The exact shares
|
||
of CPU and disk latency were not profiled separately. The production
|
||
2×25 Gbit link was not tested. The run proves data correctness in the lab;
|
||
a short final write stop for 200 million files is not yet proven. The
|
||
finalization time does not include an application restart or client
|
||
remount.
|
||
|
||
The automatic cleanup removed only the project `cephmig-million` and its
|
||
test volumes on 2026-11-07 at about 02:03 CET. The reports were kept;
|
||
afterwards about 84 GiB of host disk were free.
|
||
|
||
## Test setup
|
||
|
||
The test creates 1,000,000 files of 128 bytes of reproducible content each,
|
||
spread over 1,000 directories. In addition there are 100 hardlink names and
|
||
100 symlinks, numeric owners, POSIX access and default ACLs, user xattrs and
|
||
quotas.
|
||
|
||
A snapshot taken before the migration holds the original state. After the
|
||
initial round, the application client changes 1 % each of the contents, file
|
||
names and modes/xattrs, deletes 1 % of the files and creates 1 % new files.
|
||
Content changes keep the original mtime. Then follow the catch-up round and
|
||
the finalization with the test writer stopped. Meanwhile, a writer in another
|
||
subvolume keeps running and confirms its writes with fsync.
|
||
|
||
After the migration, a separate Python libcephfs client reads the current
|
||
target state and four target snapshots in full. Expected contents and
|
||
metadata are computed from the test model. SQLite checks on disk that inodes
|
||
map bijectively to hardlink groups. In total, 5,000,500 regular file paths
|
||
as well as symlinks, directories, ACLs, xattrs, quotas and snapshot user
|
||
metadata are checked. The Go migration additionally verifies internally.
|
||
Ceph-internal snapshot IDs and original creation times are not preserved;
|
||
this known limitation remains.
|
||
|
||
## Start and progress
|
||
|
||
```sh
|
||
make dev-million-start
|
||
make dev-million-status
|
||
docker compose -p cephmig-million -f dev/compose.yaml -f dev/compose.million.yaml logs -f benchmark
|
||
```
|
||
|
||
The separate Compose project uses two thinly provisioned 24 GiB OSDs and at
|
||
most 10 GiB of container RAM. The first start requires 68 GiB of free host
|
||
disk: at most 48 GiB for the OSDs plus a 20 GiB reserve. The running check
|
||
stops further writes when less than 20 GiB of host reserve, 3 GiB of free
|
||
host RAM or 3 GiB of free Ceph capacity per cluster remain. Images, existing
|
||
test clusters and their storage come on top. No kernel or FUSE mounts are
|
||
needed. The daemons run with an MDS cache limit of 768 MiB each. The runtime
|
||
depends heavily on the disk and the other processes on the host.
|
||
|
||
The driver keeps running as a container of its own. Status, logs, MDS
|
||
counters, durations and the sampled maximum RSS of the Go process are written
|
||
to `.dev/million/main/`. Only `result: PASS` confirms the complete check.
|
||
Generation and completed verification views have checkpoints; an interrupted
|
||
Go round uses the existing migration journal. An interrupted phase does not
|
||
count as a usable runtime measurement. Test generation runs with eight
|
||
threads, the copier with eight workers, the independent check with 16
|
||
threads. Queues and data buffers are bounded; index and inode mapping live on
|
||
disk.
|
||
|
||
## Cleanup
|
||
|
||
After a successful check, save the measurements to `docs/million-local.json`
|
||
and remove only this test project. The command refuses to clean up without
|
||
`PASS` and a successful container exit:
|
||
|
||
```sh
|
||
make dev-million-finish
|
||
```
|
||
|
||
The reports on the host are kept. The project `cephmig-dev` is separate. A
|
||
local run is no performance proof for 200 TB or 200 million files. MDS
|
||
requests are not a measurement of physical disk IOPS.
|