[Buildroot] Uclibc shm performance issue

Arnout Vandecappelle arnout at mind.be
Mon Nov 21 21:40:47 UTC 2016


 Hi Kenneth,

On 21-11-16 20:10, Kenneth Adam Miller wrote:
> Hello,
> 
> I'm using an absolutely miniscule fully compiled test inside a custom linux
> built by buildroot with uclibc, and I'm opening and memcpy'ing raw data into a
> shm region shared between two processes. On my host, I get fantastic performance
> of course, gigabytes per second as expected. Therefore I know that the code that
> I wrote is fast. But when I move it to run inside our booted image, I take a
> huge performance hit. I'm not sure what the source is, but I wanted to know if
> anybody would think that uclibc would affect performance so dramatically, or if
> there could be some buildroot specific option that I could change that would
> improve things. There are two layers of performance penalty in fact, one just
> moving into the custom linux, and another when we drive our C library with Ruby.
> I understand that that is to be expected but for me, i dont think that the
> penalty should be so enormous for that as well. Perhaps grsec could be affecting it?

 It sounds like you're stacking a huge number of changes on top of each other,
and any of them could be the cause. So I think it's better to test each of them
separately.

- Buildroot: change your configuration so it can run on your host, select glibc
as your library and the same gcc version as you use on your host, chroot into
the rootfs and execute your test application. Do you get the same performance?

- uClibc: like above, but use uClibc as the C library

- gcc: switch to the gcc version you use for your target

- linux: build the same linux version (but the upstream one) as for your target
with the configuration for your host, and boot into it natively

- grsec: like above but use the grsec-patches linux

- CPU arch: now run it on your target

and you can do all that in a different order of course.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF



More information about the buildroot mailing list