-
-
Notifications
You must be signed in to change notification settings - Fork 853
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
[WEBP] SaveImage is taking more than x100 times slower in AWS Instance than my local machine #2125
Comments
From your pod info it seems its running on ARM devices, the architecture is: We have a branch for adding some ARM hardware intrinsics support, but porting all webp intrinsics to ARM would be a huge task. |
It's not just WebP, none of our custom intrinsics support ARM at the moment. Now we've dropped a bunch of targets I hope to greatly simplify a lot of our pipeline processes and add ARM intrinsics in the process. |
Yup, I've expected that. since the dawn of .net core arm64 support, I've been poking everywhere around to get arm support ASAP👍🏿 |
@christallire you can do more then just poking. This is a open source project. You can make it better by opening Pull requests. See libwebp, all files which have |
Here are some real world benchmarks of encoding webp run with our benchmark project. Encode Webp:
cpu info
|
Perhaps @SwapnilGaikwad or somebody else from @ARM-software would be interested in providing ARM optimizations? |
I can check, but we'd have to prioritise this around other things. In the meantime myself and @SwapnilGaikwad would be happy to review any patches in this area. |
Thank you @a74nh, reviewing PR's would already be very helpful. I want to add PR's in that area to improve ARM performance, but I am still a beginner when it comes to ARM intrinsics and could use any advice there. |
From OP:
I don't think this issue should be tagged with [WEBP]. I would prioritize Jpeg with ARM optimizations. |
The code sniped the OP provided was encoding a lossy webp. Maybe he took a jpeg as input? |
Few years ago, I prepared a document to outline various Arm intrinsics APIs in .NET and explained what they do, along with an example. I still need to publish the last set of them, but probably a good starting point. |
Thanks @kunalspathak, the examples are really helpful to me! |
For V4 we should be able to achieve speedup by adopting the new APIs for .NET 7/8 #2532 |
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
2.1.1
Other ImageSharp packages and versions
None
Environment (Operating system, version and so on)
ARM64/Ubuntu/k8s
.NET Framework version
.NET 6
Description
Hi guys,
I've observed increased processing time of Image in arm64 VM environment.
It's similar to this (#2104) issue but slightly different.
Image service is running in k8s with an unlimited CPU budget and is supposed to process a lot of images concurrently.
Pod info
My local test of an image save takes 16ms, but in VM takes 1,000ms to 10,000ms (depending on size, 10 seconds with ~2MB jpg)
Steps to Reproduce
I've run this code in the thread pool and it ran into thread pool starvation almost immediately, lol.
Code
Note that the stream used to call the method is
MemoryStream
Images
No response
The text was updated successfully, but these errors were encountered: