Skip to content
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

Benchmark & Load Test EncryptedFS #50

Closed
3 of 5 tasks
CMCDragonkai opened this issue Sep 20, 2021 · 1 comment
Closed
3 of 5 tasks

Benchmark & Load Test EncryptedFS #50

CMCDragonkai opened this issue Sep 20, 2021 · 1 comment
Assignees
Labels
procedure Action that must be executed r&d:polykey:core activity 2 Cross Platform Cryptography for JavaScript Platforms

Comments

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Sep 20, 2021

Right now we only have benchmarks for crypto operations and the DB operations.

To properly assess what is the optimal block size to use (probably more than 4 KiB, but definitely less than 1 MiB), we have to do a proper load test on the EFS instance.

This requires performing a sequential set of operations vs parallel set of operations.

With the tests done in MatrixAI/Polykey#209, we can see that due to the speed for encryption/decryption, using a worker thread will always be slower cause calling workers have 1.5ms overhead.

The speed up can only happen when the there are multiple worker threads being used, so when there are multiple parallel operations occurring either through batching and/or multiple EFS reads/writes.

Benny is not the right tool to do load testing, but we may be able to adapt it for proper load testing.

Otherwise we can use a better load testing tool like artillery, but it needs to be easy to integrate, and not go through the network. This is not an HTTP server. It's a library.

Remember as long as the main thread is doing other things, and that the work is more expensive than call overhead divided by the number of workers, then we should have a profitable use of worker threads.

Additional Context

Tasks

  1. - Investigate how to use benny to create
  2. - Investigate other load testing tools like benny
  3. - Write a load test involving EFS, random read/write operations vs sequential read/write operations
  4. - Consider how these benchmarks interact with PK usage (with vault committing protocol)
  5. - Add additional test for using WorkerManager inside EncryptedFS
@CMCDragonkai
Copy link
Member Author

Preliminary load testing has already been done for EFS. Of course we can see that workers are quite a bit slow, and for single core usage, it's never worth it to use workers. It's only when there are many other concurrent operations where it becomes worth it. The exact calculation is located in another issue I forgot about.

For now I'm going to close this issue until we have a more pressing need to benchmark.

@CMCDragonkai CMCDragonkai self-assigned this Jul 24, 2022
@CMCDragonkai CMCDragonkai added the r&d:polykey:core activity 2 Cross Platform Cryptography for JavaScript Platforms label Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
procedure Action that must be executed r&d:polykey:core activity 2 Cross Platform Cryptography for JavaScript Platforms
Development

No branches or pull requests

1 participant