Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Huge memory consumption when using ImageProcessing::Vips for derivatives #685

Closed
qdegraeve opened this issue Apr 22, 2024 · 1 comment
Closed

Comments

@qdegraeve
Copy link

qdegraeve commented Apr 22, 2024

Hi,

recently we tried tu move out from Imagemagick to Vips to improve performances of derivatives processing as we use it a lot.
We had great expectations but unfortunately, the result is not at all what we expected in terms of memory consumption.

While the processing speed is increased by between 5 and 10 times, the memory is increased as well by 2.

I do not have a precise measure but I have graphs that represent the same exact flow, with the same pictures (all around 5 mb) to be processed.

In the example we try to process each image, with sidekiq and a throttle configured with a concurrency of 1. There is 19 images to be processed and here are the graphs :
With VIPS
image

With ImageMagick
image

Maybe there something I miss or do not understande.

My configuration is a container build with ruby-3.2-bookworm-slim, libvips 8.15, rails 6.1 , shrine 3.4 and sidekiq 7.2

For now I will stay with ImageMagick but if you have any clue on what is happening that would be great.

Ask me if you need further details
Regards
Quentin

@janko
Copy link
Member

janko commented Apr 28, 2024

Not sure what's causing the increased memory usage, libvips should even be using less memory than ImageMagick. This is not an issue in Shrine gem, because the image processing is handled by the ImageProcessing gem. The issue is unlikely in ImageProcessing or ruby-vips gems either, it's most likely in libvips. I will move this to a discussion.

@shrinerb shrinerb locked and limited conversation to collaborators Apr 28, 2024
@janko janko converted this issue into discussion #686 Apr 28, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants