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

ARM64 version seems incredibly slow #3

Closed
dmarkey opened this issue Jan 3, 2022 · 4 comments
Closed

ARM64 version seems incredibly slow #3

dmarkey opened this issue Jan 3, 2022 · 4 comments

Comments

@dmarkey
Copy link

dmarkey commented Jan 3, 2022

Hey,

Thanks for the fork and the ARM64 build.

I've been trying them out on some ec2 instances, however with exact same configuration, the arm64 version takes minutes to return a page vs the amd64 version(milliseconds).

They are both in the same VPC, and the same instance role.

Any ideas?

Thanks!

@dmarkey
Copy link
Author

dmarkey commented Jan 3, 2022

Oh and just to add, building the binary and running it outside of docker on the ubuntu host works fine.

@patrickdk77
Copy link
Owner

I'll have to look, not sure why that would be the case.

@patrickdk77
Copy link
Owner

I'm not able to duplicate this. Launched a t4g.micro instance, installed docker, using ubuntu 20.04 arm64 ami

version: "2.1"

services:
app:
image: patrickdk/s3-proxy
ports:
- 8080:80
environment:
- AWS_REGION=us-east-1
- AWS_ACCESS_KEY_ID=xxx
- AWS_SECRET_ACCESS_KEY=xxx
- AWS_S3_BUCKET=xxx
- INDEX_DOCUMENT=index.html
- DIRECTORY_LISTINGS=true
- DIRECTORY_LISTINGS_FORMAT=apache
- DIRECTORY_LISTINGS_CHECK_INDEX=true
- ACCESS_LOG=true
- GET_ALL_PAGES_IN_DIR=true
- HEALTHCHECK_PATH=/healthz
container_name: app

Linux ip-172-30-2-187 5.11.0-1022-aws pottava#23~20.04.1-Ubuntu SMP Mon Nov 15 14:04:48 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

[2022-01-18 04:20:54 -0000] "GET / HTTP/1.1" 200 202504 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0" 0.127
[2022-01-18 04:20:57 -0000] "GET /favicon.ico HTTP/1.1" 200 1463 "http://18.232.129.128:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0" 0.055
[2022-01-18 04:21:25 -0000] "GET / HTTP/1.1" 200 202504 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0" 0.093
[2022-01-18 04:21:32 -0000] "GET / HTTP/1.1" 200 202504 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0" 0.078
[2022-01-18 04:21:38 -0000] "GET /favicon.ico HTTP/1.1" 200 1463 "http://18.232.129.128:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0" 0.054

I see the times in the logs above and in my browser to be under 1/10th of a second.

@patrickdk77
Copy link
Owner

seems to be related to instance role v2 format aws released into the sdk you have to raise the response hops for it to work correctly inside of docker.

aws ec2 modify-instance-metadata-options
--instance-id i-1234567898abcdef0
--http-put-response-hop-limit 3
--http-endpoint enabled

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

2 participants