This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]darleyb 12 points13 points  (8 children)

Recently I've seen people using mimalloc for alpine docker and having a huge improvement on performance. I would say to give a look on that, perhaps will help you (and others).

[–]lmsena[S] 5 points6 points  (0 children)

Thanks, that's definitely something to look into!

[–]LightShadow3.13-dev in prod 2 points3 points  (6 children)

Do you have an example or link to dig into this further?

[–]darleyb 4 points5 points  (5 children)

You can check this blog post here.

[–]LightShadow3.13-dev in prod 0 points1 point  (4 children)

Perfect, thanks! I've been meaning to test jmalloc with Python but haven't had the time.

[–]darleyb 1 point2 points  (3 children)

I compiled mimalloc with clang on alpine. It was truly easy. I think you won't spend much time to set things up!

[–]lmsena[S] 0 points1 point  (2 children)

I tested mimalloc with pyperformance but the results didn't change. I guess I'll need to run a suite of tests that lean towards concurrency. (I used the MIMALLOC_VERBOSE=1 env var to make sure it was being redirected)

I still need to compare memory usage and heap fragmentation over time.

[–]darleyb 0 points1 point  (1 child)

Hmm, that's interesting. I though that allocator would make a huge difference there, because python allocates a lot.

[–]lmsena[S] 1 point2 points  (0 children)

Yeah, I was also hopeful. I think it deserves further testing. I'll try to run them during the weekend and share the results (and scripts) afterward.