You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Significant performance degradation occurs when running the repository One-Million-Photo Demo using Docker.
To Reproduce
Steps to reproduce the behavior:
Compile Urocissa from source and add one million photos to the album. (This can be done by accessing the endpoint /put/generate_random_data?number=1000000 and modifying the backend config.json file to set disableImg to true.)
Access the album via the web interface and observe the log:
2025-01-10T12:23:55Z INFO Urocissa::public::utils
15.96 µs Query cache not found. Generate a new one.
2025-01-10T12:23:55Z INFO Urocissa::public::utils
560.00 ns Filter items
2025-01-10T12:23:55Z INFO Urocissa::public::utils
168.10 ms Compute layout
2025-01-10T12:23:55Z INFO Urocissa::public::utils
120.00 ns Locate data
2025-01-10T12:23:55Z INFO Urocissa::public::utils
17.44 µs Write cache into memory
2025-01-10T12:23:55Z INFO Urocissa::public::utils
2.28 µs Create JSON response
2025-01-10T12:23:55Z INFO Urocissa::public::utils
168.40 ms (total time) Get_data_length complete
Start Urocissa using Docker (run the script bash run_urocissa_docker.sh to launch).
Access the album via the web interface and observe the log:
2025-01-10T12:25:52Z INFO Urocissa::public::utils
19.40 µs Query cache not found. Generate a new one.
2025-01-10T12:25:52Z INFO Urocissa::public::utils
440.00 ns Filter items
2025-01-10T12:25:56Z INFO Urocissa::public::utils
4.41 s Compute layout
2025-01-10T12:25:56Z INFO Urocissa::public::utils
520.00 ns Locate data
2025-01-10T12:25:56Z INFO Urocissa::public::utils
2.88 µs Write cache into memory
2025-01-10T12:25:56Z INFO Urocissa::public::utils
19.08 µs Create JSON response
2025-01-10T12:25:56Z INFO Urocissa::public::utils
4.41 s (total time) Get_data_length complete
Observed a performance degradation of over 20x (168.40 ms vs 4.41 s), primarily in the Compute layout step, which makes Urocissa unusable at this scale of one million photos.
Expected behavior
Even with potential performance overhead from Docker on Linux, the performance difference should not be this significant.
Desktop (please complete the following information):
The performance issue has been addressed in 8799acb by replacing the base Linux image in the Docker container from Alpine to bookworm-slim, a Debian-based image. Ubuntu-based images have also been tested and found to work as a solution. The root cause is suspected to be Alpine's use of musl instead of glibc, which led to significant performance degradation.
While this change resolves the issue, it comes at the cost of increasing the Docker image size from approximately 50MB to 180MB. If a method to achieve similar performance using glibc on Alpine becomes available in the future, switching back to Alpine may be reconsidered.
Describe the bug
Significant performance degradation occurs when running the repository One-Million-Photo Demo using Docker.
To Reproduce
Steps to reproduce the behavior:
Compile Urocissa from source and add one million photos to the album. (This can be done by accessing the endpoint
/put/generate_random_data?number=1000000
and modifying the backendconfig.json
file to setdisableImg
totrue
.)Access the album via the web interface and observe the log:
Start Urocissa using Docker (run the script
bash run_urocissa_docker.sh
to launch).Access the album via the web interface and observe the log:
Observed a performance degradation of over 20x (
168.40 ms
vs4.41 s
), primarily in theCompute layout
step, which makes Urocissa unusable at this scale of one million photos.Expected behavior
Even with potential performance overhead from Docker on Linux, the performance difference should not be this significant.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: