https://github.com/imgproxy/image-servers-benchmark
https://github.com/imgproxy/image-servers-benchmark
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/imgproxy/image-servers-benchmark
- Owner: imgproxy
- License: mit
- Created: 2024-03-20T14:14:24.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T20:18:26.000Z (almost 2 years ago)
- Last Synced: 2025-05-30T03:40:12.915Z (10 months ago)
- Language: Makefile
- Size: 20.5 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image processing servers benchmark
This repository contains the code used to benchmark the performance of different image processing servers. The servers tested are:
* imgproxy
* thumbor
* imagor
> [!NOTE]
> If you aren't interested in running the benchmarks yourself, you can read our [blog article](https://imgproxy.net/blog/image-processing-servers-benchmark/). Also, you can find the raw k6 outputs in the [results](results) directory.
## Running the benchmarks
We strongly recommend running the benchmarks on a separate machine purposed for the benchmarks only. C-type AWS EC2 instances are a good choice for this as they provide dedicated CPU resources.
### Running the benchmarks on AWS EC2
1. Use CloudFormation to create a new stack with the [cloudformation.yml](cloudformation.yml) template. This will create a new EC2 instance and prepare everything for the benchmark.
2. Run the benchmark with the following command:
```bash
ssh ubuntu@ -t "cd ~/benchmark; make bench- FORMAT="
```
Replace `` with the public IP of the EC2 instance (can be found in the CloudFormation stack outputs), `` with the tool you want to benchmark (`imgproxy`, `thumbor`, or `imagor`), and `` with the image format you want to benchmark (`jpeg`, `png`, `webp`, or `avif`).
For example, to run the benchmark for imgproxy with JPEG images, you would run:
```bash
ssh ubuntu@ -t "cd ~/benchmark; make bench-imgproxy FORMAT=jpeg"
```
### Running the benchmarks locally
1. You should have Docker installed on your machine. Also, to prepare the dataset, you need to have `curl`, `unzip`, and `vips` installed.
2. Clone this repository and `cd` into it.
3. Run the following command to prepare the dataset:
```bash
make prepare-dataset
```
4. Run the benchmark with the following command:
```bash
make bench- FORMAT=
```
Replace `` with the tool you want to benchmark (`imgproxy`, `thumbor`, or `imagor`), and `` with the image format you want to benchmark (`jpeg`, `png`, `webp`, or `avif`).
For example, to run the benchmark for imgproxy with JPEG images, you would run:
```bash
make bench-imgproxy FORMAT=jpeg
```