[PATCH v1 2/6] app/test: add allocator performance benchmark
Bruce Richardson
bruce.richardson at intel.com
Mon Jan 17 16:51:13 CET 2022
On Mon, Jan 17, 2022 at 03:47:41PM +0000, Bruce Richardson wrote:
> On Mon, Jan 17, 2022 at 10:07:57AM +0200, Dmitry Kozlyuk wrote:
> > Memory allocator performance is crucial to applications that deal
> > with large amount of memory or allocate frequently. DPDK allocator
> > performance is affected by EAL options, API used and, at least,
> > allocation size. New autotest is intended to be run with different
> > EAL options. It measures performance with a range of sizes
> > for dirrerent APIs: rte_malloc, rte_zmalloc, and rte_memzone_reserve.
> >
> > Work distribution between allocation and deallocation depends on EAL
> > options. The test prints both times and total time to ease comparison.
> >
> > Memory can be filled with zeroes at different points of allocation path,
> > but it always takes considerable fraction of overall timing. This is why
> > the test measures filling speed and prints how long clearing takes
> > for each size as a reference (for rte_memzone_reserve estimations
> > are printed).
> >
> > Signed-off-by: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> > Reviewed-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
> > ---
> What is the expected running time of this test? When I tried it out on my
> machine it appears to hang after the following output:
>
> USER1: 4096 10000 3.44 1.11 4.56 0.67
> USER1: 65536 10000 21.85 14.75 36.60 9.38
> USER1: 1048576 10000 481.40 329.96 811.36 147.62
>
Just realised I stripped a bit too much context here, including section
title too:
USER1: Performance: rte_malloc
USER1: Size (B) Runs Alloc (us) Free (us) Total (us) memset (us)
USER1: 64 10000 0.10 0.04 0.14 0.02
USER1: 128 10000 0.14 0.05 0.20 0.01
USER1: 1024 10000 2.39 0.15 2.54 0.06
USER1: 4096 10000 3.44 1.11 4.56 0.67
USER1: 65536 10000 21.85 14.75 36.60 9.38
USER1: 1048576 10000 481.40 329.96 811.36 147.62
More information about the dev
mailing list