NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Testing memory performance



On 11/19/2018 4:38 PM, Sad Clouds wrote:
On Sun, 18 Nov 2018 16:30:32 -0500
Eric Hawicz <erh%nimenees.com@localhost> wrote:
NetBSD: 16 threads x 1 GiB, using 1 KiB memcpy size, no mlock:
Thread 2     preflt=13504.86 msec, memcpy=2874.69 MiB/sec
...
Total transfer rate: 5817.56 MiB/sec
What?  I think your measurements are a bit off here.  There may be a
problem with the speed, but if you're measuring the per-thread rate
properly then the sum of those should equal your total transfer
rate. Are the periods during which each thread calculates its rate
very different from the period of the overall test?
The sum of all threads should not equal total transfer rate, because
threads could be running at different times. So instead of all threads
running in parallel you could have something like - T1 runs, pause, T2
runs, pause, T3 runs, pause, etc, the more pauses you have the longer
it will take for all threads to complete. Have a think about it, it
makes sense.

Sure the threads pause, but so what?  Unless you have dramatically different start and end times for all of the threads, the numbers are way off.  It doesn't matter whether a thread pauses, since that pause will be within the start & end times for that thread, and thus included in the rate calculation.

Say each thread is around for 10 seconds, and in that time it transfers 25GB of data, so that's 2.5GB/s

If your overall test is also roughly 10 seconds long, then the the total transfer rate must be roughly 2.5GB/s * # of threads.

The only way I can see that you'd end up with a total transfer rate around 5GB/s is if you didn't actually manage to get the threads running in parallel, but instead have perhaps 2-3 running at a time, then the next 2-3 don't even start until those first few finish.

Eric



Home | Main Index | Thread Index | Old Index