Variable length types slowness

Hi,

I've detected that variable length types works at least 3x slower in HDF5
1.8.4 than 1.6.10. After some debugging, the problem seems to be in line 824
of src/H5Dio.c (HDF5 1.8.4), i.e.:

{{{
    if(NULL == (type_info->bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size)))
}}}

that, at his time calls `memset` system call with `bkg_size` being normally 1
MB. I'm attaching a capture of the callgrind tool where you can see the call
tree for this.

Of course, setting 1 MB of zeros every time that a variable length type (*no
matter* how long it is going to be) has to be written to disk is way too much
for the memory subsystem, and this single `memset` call is guilty of more than
99% of L1 cache faults, making of it a huge bottleneck for writing variable
length arrays.

I wonder if you plan to address this in 1.8.x series anytime soon.

Thanks,

···

--
Francesc Alted

Hi Francesc,

Thank you for the detailed report. We really appreciate it!

Bug report has been files and we will try to address it promptly.

Elena

···

On Dec 14, 2009, at 6:00 AM, Francesc Alted wrote:

Hi,

I've detected that variable length types works at least 3x slower in HDF5
1.8.4 than 1.6.10. After some debugging, the problem seems to be in line 824
of src/H5Dio.c (HDF5 1.8.4), i.e.:

{{{
   if(NULL == (type_info->bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size)))
}}}

that, at his time calls `memset` system call with `bkg_size` being normally 1
MB. I'm attaching a capture of the callgrind tool where you can see the call
tree for this.

Of course, setting 1 MB of zeros every time that a variable length type (*no
matter* how long it is going to be) has to be written to disk is way too much
for the memory subsystem, and this single `memset` call is guilty of more than
99% of L1 cache faults, making of it a huge bottleneck for writing variable
length arrays.

I wonder if you plan to address this in 1.8.x series anytime soon.

Thanks,

--
Francesc Alted
<memset-bottleneck.png>_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org