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

What is the recommended hardware to run highly available production setup #4082

Open
woss opened this issue Apr 24, 2024 · 3 comments
Open
Labels

Comments

@woss
Copy link

woss commented Apr 24, 2024

Hi, currently i have two cheap servers with 8 cores each and 64GB of RAM. I thought this would be enough to process at least 100 images a minute but this is not the case.

So I am asking the community to help me out with finding out good hardware/server setup so I can achieve at least 100 processed images per minute.

I am building the image processing layer on top of IPFS and pre-processing each image in 5 different versions, all images are in avif format, and widths are 80, 500,1024, 2056, and 4000 without any added sharpness or blur, and metadata included.

Any help is appreciated.

the output of lscpu:
image

@woss woss added the question label Apr 24, 2024
@lovell
Copy link
Owner

lovell commented Apr 24, 2024

with 8 cores each

This looks like a CPU with 4 physical cores.

pre-processing each image in 5 different versions, all images are in avif

The bottleneck will almost certainly be AVIF encoding (via libaom).

At a guess the problem may be too many (hyper-)threads. You'll need to provide a complete, standalone code sample and images that allows someone else to both reproduce and profile if you'd like help optimising this further.

@woss
Copy link
Author

woss commented Apr 25, 2024

Uh, a common language mistake about the cores.

Unfortunately, I cannot extract the example from the source code, it is not public. But the fact that the avif might be the slow part is already a start.

I assume jpg is faster?

At a guess the problem may be too many (hyper-)threads

What do you mean by this?

@lovell
Copy link
Owner

lovell commented Apr 25, 2024

I assume jpg is faster?

Yes, usually significantly, the degree to which can depend on the type of images you're processing.

At a guess the problem may be too many (hyper-)threads

What do you mean by this?

Without sample code and images to reproduce it's hard to say, but it's possible the overhead of thread management and/or CPU cache thrashing might be slowing things. Sometimes reducing concurrency and/or parallelism can help improve throughput.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants