libbls-dev-list team mailing list archive
-
libbls-dev-list team
-
Mailing list archive
-
Message #00003
Re: libbls read benchmarks
> >
> > So it seems that the avoidable overhead is that of the use of memcpy.
> > An idea around it is to have a new API function eg
> > bless_buffer_read_foreach() that will act just like segcol_foreach().
> >
I implemented a first version of such a function (not yet uploaded) and
ran the benchmarks again. The results were very encouraging for both the
file and memory cases: we are as efficient as plain-read for the memory
case and (very) slightly less efficient than mmap for the file! I have
attached the results of the benchmarks.
Note that these results were taken using a bless_buffer using a 1000
segments (only a single segment was used in the previous tests). The
good performance that is exhibited in this case makes the results even
more encouraging. More tests are needed to check how read performance
scales with the number of segments. My guess is that performance will
drop significantly when we have many segments smaller than the page size
(for the file case, at least).
> >
> > The question is why do we have a 40% overhead in bless_buffer_read(),
> > considering that we just do a memcpy, too?
> >
That still remains to be investigated...
--
Alexandros
25 0.090000 0.056667 0.050000 0.060000 0.073333 0.070000 0.036667 0.036667 0.053333
50 0.173333 0.116667 0.103333 0.110000 0.160000 0.133333 0.073333 0.080000 0.100000
75 0.260000 0.166667 0.156667 0.166667 0.240000 0.200000 0.110000 0.120000 0.150000
100 0.340000 0.223333 0.210000 0.223333 0.310000 0.273333 0.150000 0.153333 0.200000
125 0.433333 0.276667 0.260000 0.273333 0.396667 0.340000 0.193333 0.190000 0.250000
150 0.516667 0.333333 0.306667 0.326667 0.480000 0.396667 0.230000 0.230000 0.300000
175 0.606667 0.386667 0.366667 0.383333 0.553333 0.466667 0.263333 0.270000 0.350000
200 0.690000 0.450000 0.413333 0.433333 0.636667 0.540000 0.306667 0.310000 0.403333
225 0.773333 0.503333 0.470000 0.483333 0.720000 0.603333 0.343333 0.350000 0.450000
250 0.883333 0.553333 0.520000 0.546667 0.793333 0.680000 0.383333 0.386667 0.496667
275 0.950000 0.616667 0.570000 0.600000 0.866667 0.733333 0.423333 0.423333 0.550000
300 1.066667 0.673333 0.616667 0.656667 0.956667 0.830000 0.460000 0.460000 0.603333
325 1.140000 0.723333 0.676667 0.703333 1.030000 0.920000 0.496667 0.500000 0.650000
350 1.233333 0.783333 0.726667 0.763333 1.103333 1.013333 0.540000 0.540000 0.700000
plot "bench_read.data" using 1:2 with linespoints title "file:bless_buffer_read",\
"bench_read.data" using 1:3 with linespoints title "file:bless_buffer_read_foreach",\
"bench_read.data" using 1:4 with linespoints title "file:read",\
"bench_read.data" using 1:5 with linespoints title "file:mmap",\
"bench_read.data" using 1:6 with linespoints title "file:mmap+memcpy"
pause -1
plot "bench_read.data" using 1:7 with linespoints title "mem:bless_buffer_read",\
"bench_read.data" using 1:8 with linespoints title "mem:bless_buffer_read_foreach",\
"bench_read.data" using 1:9 with linespoints title "mem:plain",\
"bench_read.data" using 1:10 with linespoints title "mem:memcpy"
pause -1
References