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

multiarch support #44

Closed
povilasv opened this issue Apr 21, 2020 · 9 comments · Fixed by #49
Closed

multiarch support #44

povilasv opened this issue Apr 21, 2020 · 9 comments · Fixed by #49

Comments

@povilasv
Copy link
Collaborator

povilasv commented Apr 21, 2020

I would be keen to add multi arch support for arm/arm64. We might as well do ppc64le / s390x .

For quay you would need to create empty repos like I did for systemd_exporter:

https://quay.io/repository/povilasv/systemd-exporter-linux-amd64
https://quay.io/repository/povilasv/systemd-exporter-linux-s390x
https://quay.io/repository/povilasv/systemd-exporter-linux-ppc64le
https://quay.io/repository/povilasv/systemd-exporter-linux-armv7
https://quay.io/repository/povilasv/systemd-exporter-linux-ppc64le

This is how it looks in quay:

https://quay.io/repository/povilasv/systemd-exporter?tab=tags

image

What do you think?

FYI I have a working k8s cluster which has arm64/arm nodes in it for testing.

@brancz
Copy link
Member

brancz commented Apr 23, 2020

Nice 👍 that would be really awesome!

@povilasv
Copy link
Collaborator Author

povilasv commented Apr 24, 2020

FYI cloud drone ci doesn't support docker in docker qemu https://discourse.drone.io/t/run-docker-container-in-docker/5704

So we will have to use workers that are native to that platform (no cross compiling). So we only get arm / arm64 as drone ci cloud supports that. One thing to note is that build queues for arm / arm64 are quite long (builds take 10+ mins)

Right now I have proof of concept in progress:
https://cloud.drone.io/povilasv/conprof/14

I really like drone ci & it looks really good. But If we conisder switching to circle ci we can use https://github.com/prometheus/circleci prometheus orb, which simplifies stuff and get ppc64le / s390x.

Another option is hosting your own drone ci worker, which has docker privilleged enabled.

If we don't care about pc64le / s390x for now, we can work around build queues by just running arm / arm64 builds on merge to master. Otherwise if you are fine to wait 10 mins for a build, it's fine.

WDYT?

@povilasv
Copy link
Collaborator Author

FYI build wait times got way lower, maybe it was just super busy, so we can ignore the wait time issue.

@povilasv
Copy link
Collaborator Author

image

Finally figured out a way to do it, will test on my cluster and do a PR.

turns out we don't need empty repos, as we just use tags for different architecture images.

@brancz
Copy link
Member

brancz commented Apr 24, 2020

Nice 👍. Yeah if we can I would prefer to stick to drone, but no strong opinion. Looking forward to the contribution! :)

@povilasv
Copy link
Collaborator Author

Arm64 works beautifully

image

image

@povilasv
Copy link
Collaborator Author

povilasv commented Apr 28, 2020

I've made it work on arm (32bit) with the following patch https://github.com/conprof/conprof/pull/45/files#diff-604f4192deea5adf9c159e5f88f64630R54-R69

But CPU usage went crazy high for some reason:

image

compared to arm64:

image

Not sure what happened there now it's normal, but I will run arm version for a bit longer and try to reproduce / look at profiles.

@povilasv
Copy link
Collaborator Author

povilasv commented May 1, 2020

Couldn't reproduce the cpu spike, so I propose to adding it in #49 and if it happens again I will investigate ;)

@povilasv
Copy link
Collaborator Author

povilasv commented May 1, 2020

Actually I got it again.

When I straced it forever looped in:

sched_yield()                           = 0
sched_yield()                           = 0
sched_yield()                           = 0
sched_yield()                           = 0
sched_yield()                           = 0
sched_yield()                           = 0
sched_yield()                           = 0
sched_yield()                           = 0

which is go runtime bug in golang/go#38023 , which will be fixed in 1.14.2

@brancz brancz closed this as completed in #49 May 3, 2020
brancz pushed a commit that referenced this issue Oct 5, 2021
Server the pprof endpoint at /debug/pprof
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

Successfully merging a pull request may close this issue.

2 participants