Skip to content

Conversation

@yuly16
Copy link
Contributor

@yuly16 yuly16 commented Jul 13, 2023

Unaligned read causes error for SIMD instructions. For example, is the address of a long column vector is 0x0c, it would have unalign read (the address should be the multiple of 8). In the normal instruction it would affect the performance adversely, but we don't know how much performance degrade would happen, but at least here is no correctness issue. However, if we use SIMD, the unalign read is erroneous, so we have to fix it.

We add a parameter in pixels.properties so that we can adjust the alignment value. The default one is 32. It is aligned for avx2(256 bit) SIMD instruction.

Closes #493.

@bianhq bianhq changed the title [Issue #493] Align the location of column byte buffer in pxl file [Issue #493] Align the location of column byte buffer in pxl file. Jul 14, 2023
Copy link
Contributor

@bianhq bianhq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@bianhq bianhq merged commit e2ee046 into pixelsdb:master Jul 17, 2023
bianhq pushed a commit to bianhq/pixels that referenced this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pixels-core] The location of the column is not aligned, which makes it hard to do SIMD parallelization.

2 participants