Write to Disk in Nodejs
5-10ms to write to SSD for strings less than 10,000 characters.
(with sync to disk).
GT-Sandbox-Snapshot
Command to reproduce:
gt.sandbox.checkout.commit 90303db14ce95a6df23d \
&& cd "${GT_SANDBOX_REPO}" \
&& cmd.run.announce "./run.sh"
Recorded output of command:
Starting file write benchmarks...
Started [Write a string of [500] characters to file (Node.js)], going to run for [1000]...
#### Benchmark: Write a string of [500] characters to file (Node.js)
| Metric | Time | Value (ns) |
|--------------|------------|--------------:|
| Min | 4.899 ms | 4,899,398 |
| P50 (Median) | 5.186 ms | 5,185,765 |
| P90 | 5.308 ms | 5,307,762 |
| P95 | 5.370 ms | 5,370,353 |
| P99 | 5.686 ms | 5,686,219 |
| P99.9 | 9.962 ms | 9,962,423 |
| Max | 9.962 ms | 9,962,423 |
| Total | 5.200 s | 5,199,505,394 |
| Iterations | 1,000 | |
Started [Write a string of [1000] characters to file (Node.js)], going to run for [1000]...
#### Benchmark: Write a string of [1000] characters to file (Node.js)
| Metric | Time | Value (ns) |
|--------------|------------|--------------:|
| Min | 4.913 ms | 4,913,184 |
| P50 (Median) | 5.124 ms | 5,124,034 |
| P90 | 5.274 ms | 5,274,016 |
| P95 | 5.319 ms | 5,318,924 |
| P99 | 5.802 ms | 5,801,763 |
| P99.9 | 10.144 ms | 10,144,346 |
| Max | 10.144 ms | 10,144,346 |
| Total | 5.166 s | 5,165,946,193 |
| Iterations | 1,000 | |
Started [Write a string of [2000] characters to file (Node.js)], going to run for [1000]...
#### Benchmark: Write a string of [2000] characters to file (Node.js)
| Metric | Time | Value (ns) |
|--------------|------------|--------------:|
| Min | 4.860 ms | 4,860,061 |
| P50 (Median) | 5.112 ms | 5,112,402 |
| P90 | 5.321 ms | 5,321,158 |
| P95 | 5.476 ms | 5,475,930 |
| P99 | 6.214 ms | 6,213,986 |
| P99.9 | 10.127 ms | 10,126,632 |
| Max | 10.127 ms | 10,126,632 |
| Total | 5.190 s | 5,189,873,467 |
| Iterations | 1,000 | |
Started [Write a string of [10000] characters to file (Node.js)], going to run for [1000]...
#### Benchmark: Write a string of [10000] characters to file (Node.js)
| Metric | Time | Value (ns) |
|--------------|------------|--------------:|
| Min | 4.889 ms | 4,888,916 |
| P50 (Median) | 5.100 ms | 5,099,928 |
| P90 | 5.279 ms | 5,278,977 |
| P95 | 5.498 ms | 5,497,842 |
| P99 | 6.359 ms | 6,359,360 |
| P99.9 | 9.896 ms | 9,896,024 |
| Max | 9.896 ms | 9,896,024 |
| Total | 5.166 s | 5,166,243,294 |
| Iterations | 1,000 | |
All benchmarks completed!
Backlinks