-
Notifications
You must be signed in to change notification settings - Fork 38.6k
docs: add ramdisk guide for running tests on OSX #27124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
utACK 62ac3b4 That looks pretty much like what I use on macOS. |
willcl-ark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK 62ac3b4
|
Concept ACK |
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
62ac3b4 to
ab6f73a
Compare
|
Tested these steps on my macOS machine and it worked as expected: ➜ bitcoin-core-dev git:(master) ✗ diskutil erasevolume HFS+ ramdisk $(hdiutil attach -nomount ram://8388608)
Started erase on disk5
Unmounting disk
Erasing
Initialized /dev/rdisk5 as a 4 GB case-insensitive HFS Plus volume
Mounting disk
Finished erase on disk5 (ramdisk)
➜ bitcoin-core-dev git:(master) ✗ ./test/functional/test_runner.py --cachedir=/Volumes/ramdisk/cache --tmpdir=/Volumes/ramdisk/tmp
Temporary test directory at /Volumes/ramdisk/tmp/test_runner_₿_🏃_20230221_120656
Running Unit Tests for Test Framework Modules
..........
----------------------------------------------------------------------
Ran 10 tests in 0.595s
OK
1/260 - feature_taproot.py passed, Duration: 31 s
...
➜ bitcoin-core-dev git:(master) ✗ umount /Volumes/ramdisk |
|
Concept ACK |
stickies-v
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK ab6f73a1f65bcfd59fea07f3067312a757dba2f8
I use this command on my M1 too.
ab6f73a to
cb7be3a
Compare
stickies-v
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK cb7be3a
willcl-ark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK cb7be3a237c7e5a3d09f24259be015557dc72bca
Tested on my Macbook, worked as expected and speeded up the test suite noticeably.
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK cb7be3a237c7e5a3d09f24259be015557dc72bca
cb7be3a to
2f84ad7
Compare
brunoerg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 2f84ad7
|
ACK 2f84ad7 M1 Max, macOS 13.2 $ diskutil erasevolume HFS+ ramdisk $(hdiutil attach -nomount ram://8388608)
Started erase on disk6
Unmounting disk
Erasing
Initialized /dev/rdisk6 as a 4 GB case-insensitive HFS Plus volume
Mounting disk
Finished erase on disk6 (ramdisk)
$ diskutil info disk6 | grep -e Size
Disk Size: 4.3 GB (4294967296 Bytes) (exactly 8388608 512-Byte-Units)
Device Block Size: 512 Bytes
Allocation Block Size: 4096 Bytes
$ test/functional/test_runner.py --cachedir=/Volumes/ramdisk/cache --tmpdir=/Volumes/ramdisk/tmp
Temporary test directory at /Volumes/ramdisk/tmp/test_runner_₿_🏃_20230222_105652
..........
ALL | ✓ Passed | 2702 s (accumulated)
Runtime: 292 s
$ umount /Volumes/ramdisk |
|
ACK 2f84ad7 |
2f84ad7 docs: add ramdisk guide for running tests on OSX (Matthew Zipkin) Pull request description: Using a ramdisk on OSX sped up the test suite by about 5x (using default `jobs=4`) on my M1 macbook pro running macOS Monterey 12.3.1. This PR adds the relevant OSX commands following the Linux directions. Default: ``` 8204 s (accumulated) Runtime: 2104 s ``` following commands from the PR: ``` 1606 s (accumulated) Runtime: 421 s ``` ramdisk + `jobs=32`: ``` 2090 s (accumulated) Runtime: 85 s ``` ACKs for top commit: jonatack: ACK 2f84ad7 willcl-ark: ACK 2f84ad7 brunoerg: utACK 2f84ad7 Tree-SHA512: 37a9903c8ac2cbfaa91e7e73fc96ef65042ff4b15763d452af7b8615255adf03429ad01cf85265a99dd569290c1d69c05a393d616868c05c190b60b053820786
Using a ramdisk on OSX sped up the test suite by about 5x (using default
jobs=4) on my M1 macbook pro running macOS Monterey 12.3.1. This PR adds the relevant OSX commands following the Linux directions.Default:
following commands from the PR:
ramdisk +
jobs=32: