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

Memory usage #11

Open
oduis opened this issue Jan 12, 2017 · 8 comments
Open

Memory usage #11

oduis opened this issue Jan 12, 2017 · 8 comments

Comments

@oduis
Copy link

oduis commented Jan 12, 2017

The official 1.0 release binary crashes on Windows encoding a 24 MP photo.
It seems like this is a RAM issues, since it quickly eats gigabytes of RAM before crashing.
Is there a 64bit version? And is the RAM usage expected?

@khavishbhundoo
Copy link
Contributor

There is only a 32bit version for windows currently.I think it would help if you could provide the photo.

@oduis
Copy link
Author

oduis commented Jan 12, 2017

Unfortunately the file is pretty large, so I put it on my website:
http://www.visualbakery.com/Download/CrashGuetzliOnWindows_RAMOverflow.png
It does not seem to be dependent on the file. Other photos of this size crash Gruetzli, too.

@robryk
Copy link
Contributor

robryk commented Jan 12, 2017

I've encoded that image on 64bit linux. It seems that it uses north of 5GB of memory, so it would use not less than half of that on a 32bit system (and likely much more than half, because memory usage of all the pointers is a small fraction of all that memory), which is over 2GB (which is presumably the address space available there). I will add Windows 64bit binaries to the release shortly.

I agree that Guetzli is very wasteful with memory (it keeps multiple unnecessary copies of the whole image). I would very much welcome any PRs that get rid of some of the unnecessary copies of the images or similar things.

@robryk
Copy link
Contributor

robryk commented Jan 12, 2017

Also, please note that Guetzli assumes that the image will be viewed at a reasonable DPI. If the image will be downsampled before viewing, Guetzli will use up a significant amount of space for the details that will not be visible due to downsampling.

@oduis
Copy link
Author

oduis commented Jan 12, 2017

The use case for me would be to have a tool that converts Lightroom output to an optimized format.
Since the camera images are pretty large 20% makes a lot of difference.
I was wondering if Guetzli is better than Lightrooms JPG outplus plus JPGMini for compression.
But I guess I have to wait till the Guetzli is a bit more optimized.

@Furniel
Copy link

Furniel commented Jan 13, 2017

oduis
X64 windows build, just for testing(may be buggy). Your image was optimized successfully, but guetzli need more than 5gb of ram and a lot of time to process your test image.
https://mega.nz/#!p8EUSIQR!IfgMKQeuLMR2gtOnSCgDGRtulFINI6Nw0t-vtlZd-_0

@oduis
Copy link
Author

oduis commented Jan 13, 2017

Thanks for the build, Furniel! It works, however after first tests Guetzli is awful slow, even on powerful i7 processor.
The compression results with large photos seem to be not really better than Lightroom + JPGMini.
So I guess Guetzli is not really good for this use case. Maybe it is better suited for small pictures with strong compression.

@robryk
Copy link
Contributor

robryk commented Jan 17, 2017

The new release contains 64 bit Windows binaries.

robryk added a commit to robryk/guetzli that referenced this issue Mar 14, 2017
This should help with google#11 inasmuch as it should make the nature of the
problem obvious.
jyrkialakuijala pushed a commit that referenced this issue Mar 14, 2017
This should help with #11 inasmuch as it should make the nature of the
problem obvious.
szabadka added a commit that referenced this issue Mar 29, 2017
Reduce memory usage of butteraugli. Addresses #11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants