Skip to main content

Python Benchmark: multi-thread vs multi-process

Project description

python-benchmark-thread-vs-process

A benchmark on speed evaluation between multi-thread and multi-process in Python

Installation

$ sudo pip3 install python_benchmark_thread_vs_process

Note: this package only supports Python 3.

Install package and run test in one command:

$ sudo pip3 install python_benchmark_thread_vs_process && python_benchmark_thread_vs_process

Usage

Run benchmarking with the following command:

$ python_benchmark_thread_vs_process

Note: It takes up to 15 minutes to finish the test. Please be patient!

Benchmarking Results

Try to keep your CPUs usage free as much as possible before benchmarking.

For latest benchmarking result, please checkout @ https://github.com/minhng-info/python-benchmark-thread-vs-process

Num CPUs CPU Model Current CPU Freq (MHz) Multi-Thread Time (s) Multi-Process Time (s) Total Test Operation Contributor
1 Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz 2500 11.7581 12.0673 100 @minhng92
4 Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz 2474 55.3840 8.8589 400 @minhng92
4 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz 2683 20.9098 10.9195 400 @minhng92
16 Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz 2597 98.6584 7.1033 1600 @minhng92
24 Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz 1331 372.3926 18.5923 2400 @minhng92
32 Intel(R) Xeon(R) Silver 4108 CPU @ 1.80GHz 809 478.8115 15.0538 3200 @minhng92
72 Intel(R) Xeon(R) Gold 5220S CPU @ 2.70GHz 1016 550.4936 11.6759 7200 @minhng92

Contributing

Benchmarking

To contribute to our benchmark table, please follow these steps:

  • Step 1: Install package: pip install python-benchmark-thread-vs-process
  • Step 2: Run benchmarking on your machine / server with the command: python_benchmark_thread_vs_process
  • Step 3: If your system information has not been included in the benchmarking results, please create a new issue ticket (with enhancement label) and submit your benchmarking result. Your submission is welcome!
  • Step 4: We'll review and update the benchmarking results.

Code development

  • Step 1. Fork on master branch.
  • Step 2. Install pre-commit on the local dev environment.
pip install pre-commit
pre-commit install

  • Step 3. Write unit-test (if any).
  • Step 4. Write code to pass the tests.
  • Step 5. Make sure that the new code passes all the pre-commmit conditions.
sh pre_commit.sh

  • Step 6. Create pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

python_benchmark_thread_vs_process-0.1.4-py2.py3-none-any.whl (11.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file python_benchmark_thread_vs_process-0.1.4.tar.gz.

File metadata

  • Download URL: python_benchmark_thread_vs_process-0.1.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for python_benchmark_thread_vs_process-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f28fa999c7542fd439c76d65214cbcf7d2c8efb2eff7a76038cbe5fb423d34c3
MD5 654521388a11faa2df702a7bf9aa50fa
BLAKE2b-256 bf195263b8b0dc3f51be78dab286cd5721c40aa11e63eaca14575a723fab319a

See more details on using hashes here.

File details

Details for the file python_benchmark_thread_vs_process-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for python_benchmark_thread_vs_process-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 40bbfae4e781abafddbb2a1b00b12fdae478b1632ff9acf0a988ace684d583f8
MD5 7df2cb22d537b0e4000859a23ad2d8ca
BLAKE2b-256 d3e941435586b31670b9d6339e5f22436da319fe9a68bcb771f15f3e60c3afc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page