Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 29, 2016

@maflcko maflcko added the Tests label Apr 29, 2016
@maflcko
Copy link
Member Author

maflcko commented Apr 29, 2016

Looks like this runs the extended tests (no pruning) 4 times faster on my machine:

Total time: 314 s (accumulated: 1306 s)

@jonasschnelli
Copy link
Contributor

Wow. This is a great idea.
Concept ACK.

@theuni
Copy link
Member

theuni commented Apr 29, 2016

Concept ACK, thanks for working on this!

@jtimon
Copy link
Contributor

jtimon commented Apr 29, 2016

Nice! Concept ACK. I wil review better and benchmark another day.

@maflcko maflcko force-pushed the Mf1604-qaParallel branch 8 times, most recently from 9d7c42f to fa48ef8 Compare May 1, 2016 10:28
@fanquake
Copy link
Member

fanquake commented May 5, 2016

First run testing this (shortened tests),

ALL   | True   | 764 s (accumulated)

Runtime: 212 s

Concept ACK

@sdaftuar
Copy link
Member

sdaftuar commented May 5, 2016

@MarcoFalke This is great, thanks for tackling! Any idea what's causing the travis failure?

I think it would be nice to make the number of simultaneous jobs configurable on the command line; the default of 4 seems good but being able to tweak it for the machine it's running on (say if other developers run this script locally, as I do) would be nice.

I also noticed that by re-sorting the standard tests so that the slowest jobs start first, I was able to get the runtime of all the standard tests running in parallel down to the same as running the single longest test (walletbackup.py) -- awesome!

@sdaftuar
Copy link
Member

sdaftuar commented May 5, 2016

Hm, I just ran the extended tests and got an odd failure -- this test looks like it is supposed to be marked successful.

bip9-softforks.py:
Initializing test directory /tmp/testE9D_TH
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:13641
Test 1: PASS [143]
Test 2: PASS [287]
Test 3: PASS [431]
Test 4: PASS [574]
Test 5: PASS [575]
Test 6: PASS [575]
Initializing test directory /tmp/testE9D_TH
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:13641
Test 7: PASS [143]
Test 8: PASS [287]
Test 9: PASS [431]
Test 10: PASS [574]
Test 11: PASS [575]
Test 12: PASS [575]
Initializing test directory /tmp/testE9D_TH
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:13641
Test 13: PASS [143]
Test 14: PASS [287]
Test 15: PASS [431]
Test 16: PASS [574]
Test 17: PASS [575]
Test 18: PASS [575]
Initializing test directory /tmp/testE9D_TH
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:13641
Stopping nodes
Cleaning up
Tests successful

BDB3028 /tmp/testE9D_TH/blocks.db: unable to flush: No such file or directory

Pass: False, Duration: 41 s

Maybe that last line about "unable to flush" is going to stderr, causing this to be recorded as failure? If so then probably the test should be fixed.

@fanquake
Copy link
Member

fanquake commented May 6, 2016

Agree with @sdaftuar that there is benefit in sorting the standard tests.
Longest -> shortest:

ALL | True   | 857 s (accumulated)
Runtime: 218 s

Compared to as is:

ALL | True   | 845 s (accumulated)
Runtime: 238 s

@paveljanik
Copy link
Contributor

paveljanik commented May 6, 2016

ACK fa48ef8

Thanks!

Edit: I was checking it pre-python3, so ...

@fanquake
Copy link
Member

fanquake commented May 6, 2016

This needs to be updated to use http.client before it can merged, now that the Python3 change is in.

@maflcko maflcko force-pushed the Mf1604-qaParallel branch from fa48ef8 to 407fb96 Compare May 9, 2016 15:18
@maflcko maflcko force-pushed the Mf1604-qaParallel branch from 8db2cd0 to ccccc59 Compare May 9, 2016 17:56
@maflcko
Copy link
Member Author

maflcko commented May 9, 2016

  • Rebased and translated to python3
  • made it possible to specify -parallel=n on the command line
  • Moved walletbackup.py to first position
  • --portseed is set in a deterministic manner for each rpc test

@jtimon
Copy link
Contributor

jtimon commented May 10, 2016

$ python3 ./qa/pull-tester/rpc-tests.py -parallel=20000
...
ALL                            | True   | 634 s (accumulated)
Runtime: 143 s

$ python3 ./qa/pull-tester/rpc-tests.py -parallel=20000 -extended
...
maxuploadtarget.py             | True   | 81 s
walletbackup.py                | True   | 135 s
smartfees.py                   | True   | 341 s
pruning.py                     | True   | 1503 s

ALL                            | False  | 3076 s (accumulated)

Runtime: 1503 s

Now I'm too lazzy to run them before this patch to compare...benchmark conclusion: this is great.

It also comes to mind that, in terms of time, only smartfees and pruning deserve to be in the extended tests group more then walletbackup. But probably moving walletbackup to the extended tests (and maybe some of the faster ones out of the extended group to the regular one at the same time?) is out of the scope of this PR.

Tested ACK.

@theuni
Copy link
Member

theuni commented May 10, 2016

This is great. Looking at a random travis before/after, this goes from 535sec to 164sec.
untested (locally) ACK.

@sdaftuar
Copy link
Member

This looks great, though there's still the issue with the bip9-softforks.py test outputting to stderr, causing the extended tests to fail. I'm trying to figure out a fix to suggest for that, but I'm not having any great ideas at the moment...

@paveljanik
Copy link
Contributor

reACK ccccc59

@maflcko
Copy link
Member Author

maflcko commented May 10, 2016

@sdaftuar This seems to be a local problem or a problem with the bip9 test and is not caused by this pull, I assume?

Runs fine locally, just now:

TEST              | PASSED | DURATION

bip9-softforks.py | True   | 66 s

ALL               | True   | 66 s (accumulated)

Runtime: 66 s

@sdaftuar
Copy link
Member

Yep I didn't realize this was just affecting me, will open a separate issue.

ACK.

@maflcko maflcko merged commit ccccc59 into bitcoin:master May 10, 2016
maflcko pushed a commit that referenced this pull request May 10, 2016
ccccc59 [qa] Add option --portseed to test_framework (MarcoFalke)
fa494de [qa] pull-tester: Run rpc test in parallel (MarcoFalke)
@maflcko maflcko deleted the Mf1604-qaParallel branch May 10, 2016 16:29
codablock pushed a commit to codablock/dash that referenced this pull request Dec 21, 2017
ccccc59 [qa] Add option --portseed to test_framework (MarcoFalke)
fa494de [qa] pull-tester: Run rpc test in parallel (MarcoFalke)
zkbot added a commit to zcash/zcash that referenced this pull request Dec 2, 2020
Backport migration from rpc-tests.sh to rpc-tests.py

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6567
- bitcoin/bitcoin#6523
- bitcoin/bitcoin#6616
- bitcoin/bitcoin#6788
  - Only the commit fixing `rpc-tests.py`
- bitcoin/bitcoin#6791
  - Only the fix to `qa/rpc-tests/README.md`
- bitcoin/bitcoin#6827
- bitcoin/bitcoin#6930
- bitcoin/bitcoin#6804
- bitcoin/bitcoin#7029
- bitcoin/bitcoin#7028
- bitcoin/bitcoin#7027
- bitcoin/bitcoin#7135
- bitcoin/bitcoin#7209
- bitcoin/bitcoin#7635
- bitcoin/bitcoin#7778
- bitcoin/bitcoin#7851
- bitcoin/bitcoin#7814
  - Only the changes to the new .py files in this PR.
- bitcoin/bitcoin#7971
- bitcoin/bitcoin#7972
- bitcoin/bitcoin#8056
  - Only the first commit.
- bitcoin/bitcoin#8098
- bitcoin/bitcoin#8104
- bitcoin/bitcoin#8133
  - Only the `rpc-tests.py` commit.
- bitcoin/bitcoin#8066
- bitcoin/bitcoin#8216
  - Only the last two commits.
- bitcoin/bitcoin#8254
- bitcoin/bitcoin#8400
- bitcoin/bitcoin#8482
  - Excluding the first commit (only affects RPC tests we don't have).
- bitcoin/bitcoin#8551
- bitcoin/bitcoin#8607
  - Only the pull-tester commit, for conflict removal.
- bitcoin/bitcoin#8625
- bitcoin/bitcoin#8713
- bitcoin/bitcoin#8750
- bitcoin/bitcoin#8789
- bitcoin/bitcoin#9098
- bitcoin/bitcoin#9276
  - Excluding the second commit (we don't have the changes it requires).
- bitcoin/bitcoin#9657
- bitcoin/bitcoin#9807
- bitcoin/bitcoin#9766
- bitcoin/bitcoin#9823
zkbot added a commit to zcash/zcash that referenced this pull request Dec 2, 2020
Backport migration from rpc-tests.sh to rpc-tests.py

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6567
- bitcoin/bitcoin#6523
- bitcoin/bitcoin#6616
- bitcoin/bitcoin#6788
  - Only the commit fixing `rpc-tests.py`
- bitcoin/bitcoin#6791
  - Only the fix to `qa/rpc-tests/README.md`
- bitcoin/bitcoin#6827
- bitcoin/bitcoin#6930
- bitcoin/bitcoin#6804
- bitcoin/bitcoin#7029
- bitcoin/bitcoin#7028
- bitcoin/bitcoin#7027
- bitcoin/bitcoin#7135
- bitcoin/bitcoin#7209
- bitcoin/bitcoin#7635
- bitcoin/bitcoin#7778
- bitcoin/bitcoin#7851
- bitcoin/bitcoin#7814
  - Only the changes to the new .py files in this PR.
- bitcoin/bitcoin#7971
- bitcoin/bitcoin#7972
- bitcoin/bitcoin#8056
  - Only the first commit.
- bitcoin/bitcoin#8098
- bitcoin/bitcoin#8104
- bitcoin/bitcoin#8133
  - Only the `rpc-tests.py` commit.
- bitcoin/bitcoin#8066
- bitcoin/bitcoin#8216
  - Only the last two commits.
- bitcoin/bitcoin#8254
- bitcoin/bitcoin#8400
- bitcoin/bitcoin#8482
  - Excluding the first commit (only affects RPC tests we don't have).
- bitcoin/bitcoin#8551
- bitcoin/bitcoin#8607
  - Only the pull-tester commit, for conflict removal.
- bitcoin/bitcoin#8625
- bitcoin/bitcoin#8713
- bitcoin/bitcoin#8750
- bitcoin/bitcoin#8789
- bitcoin/bitcoin#9098
- bitcoin/bitcoin#9276
  - Excluding the second commit (we don't have the changes it requires).
- bitcoin/bitcoin#9657
- bitcoin/bitcoin#9807
- bitcoin/bitcoin#9766
- bitcoin/bitcoin#9823
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants