wire-server
wire-server copied to clipboard
Dev env: Use ScyllaDB for faster testing
This PR updates the development environment: cassandra is replaced by scylladb. On my machineâ„¢ I've seen substantinal performance improvements:
- Schema migrations are applied much faster
- Integration tests run faster: brig-integration runs in 60s (sylladb) vs 90s (cassandra)
- Less memory seems to be used
All integration tests suites pass locally for me.
Checklist
- [x] Add a new entry in an appropriate subdirectory of
changelog.d
- [x] Read and follow the PR guidelines
Nice! Here are times I observed for setup and new integration:
old
make db-migrate 2.83s user 1.92s system 1% cpu 4:47.96 total
./dist/integration 52.89s user 22.20s system 51% cpu 2:26.75 total
scylla
make db-migrate 1.94s user 1.20s system 4% cpu 1:07.59 total
./dist/integration 54.83s user 22.66s system 48% cpu 2:39.92 total
So setup is more than 4x faster. However, the new integration tests are about the same. I guess that's because the runtime is dominated by spawning new backends and waiting for services to come up. Overall, it seems like a win.
What worries me is that I see a lot of:
[[email protected]] 2023/11/02 14:41:41 [emerg] 130444#130444: io_setup() failed (11: Resource temporarily unavailable)
with this patch. Any idea what might be causing this?
For me it had almost no effect. After running it using time
and hyperfine
, I've not found a significant performance difference between the two. I did however get a much faster db-reset
result. Since it has no detrimental effect for my own env and clearly shows an improvement for others, sounds like a good idea to me. ✅
This is not good to merge yet. When running ./services/run-services
I get
[[email protected]] cannon: Network.Socket.bind: resource busy (Address already in use)
[[email protected]] cannon: Network.Socket.bind: resource busy (Address already in use)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44976#44976: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44977#44977: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44978#44978: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44979#44979: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44983#44983: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44984#44984: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44987#44987: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] 2023/11/06 11:28:37 [emerg] 44988#44988: io_setup() failed (11: Resource temporarily unavailable)
[[email protected]] cargohold: Network.Socket.bind: resource busy (Address already in use)
[[email protected]] cargohold: Network.Socket.bind: resource busy (Address already in use)
services started