Create #define for network buffer alignment#267
Merged
9EOR9 merged 1 commit intomariadb-corporation:3.4from Jul 9, 2025
Merged
Create #define for network buffer alignment#2679EOR9 merged 1 commit intomariadb-corporation:3.4from
9EOR9 merged 1 commit intomariadb-corporation:3.4from
Conversation
Contributor
Author
|
@vuvova , I imagine your comment ( #265 (review) ) still stands, yes? |
Member
|
Yes, it does |
ec9310e to
cd61fb2
Compare
cd61fb2 to
7212d19
Compare
grooverdan
approved these changes
May 21, 2025
This was referenced May 21, 2025
The server's definition of IO_SIZE is re-used here in the client for network buffer alignment, however IO_SIZE is used in the server for many different things and the client's buffer alignment is not related to many of those uses. If the server is to make IO_SIZE configurable, we need to avoid either redefining it, or defining it to be different. By creating a specific define for this, we avoid redfine and clarify the code. See: MariaDB/server#3726 Signed-off-by: Eric Herman <[email protected]>
7212d19 to
f5319d9
Compare
ericherman
added a commit
to ericherman/mariadb-server
that referenced
this pull request
Aug 14, 2025
Making mariadb's IO_SIZE compile-time configurable enables more straight-forward investigation of the performance implications of having an IO_SIZE which is different than the memory page size. The default IO_SIZE of 4096 as defined in include/my_global.h and also in libmariadb's include/ma_global.h matches to the memory page size of most systems. Larger page sizes are widely supported, called "huge pages" in Linux, "superpages" in FreeBSD, and "large pages" in MS Windows. On POSIX systems, obtaining the page size can be done via: page_size= sysconf(_SC_PAGESIZE); On Windows: SYSTEM_INFO si; GetSystemInfo(&si); page_size= si.dwPageSize; In https://jira.mariadb.org/browse/MDEV-35740 Marko highlights that there are vastly different uses of IO_SIZE. This "one size fits all" nature of IO_SIZE is not ideal, future work could split this into separate constants based upon usage. See also: mariadb-corporation/mariadb-connector-c#267 Signed-off-by: Eric Herman <[email protected]>
ericherman
added a commit
to ericherman/mariadb-server
that referenced
this pull request
Feb 4, 2026
Making mariadb's IO_SIZE compile-time configurable enables more straight-forward investigation of the performance implications of having an IO_SIZE which is different than the memory page size. The default IO_SIZE of 4096 as defined in include/my_global.h and also in libmariadb's include/ma_global.h matches to the memory page size of most systems. Larger page sizes are widely supported, called "huge pages" in Linux, "superpages" in FreeBSD, and "large pages" in MS Windows. On POSIX systems, obtaining the page size can be done via: page_size= sysconf(_SC_PAGESIZE); On Windows: SYSTEM_INFO si; GetSystemInfo(&si); page_size= si.dwPageSize; In https://jira.mariadb.org/browse/MDEV-35740 Marko highlights that there are vastly different uses of IO_SIZE. This "one size fits all" nature of IO_SIZE is not ideal, future work could split this into separate constants based upon usage. See also: mariadb-corporation/mariadb-connector-c#267 Signed-off-by: Eric Herman <[email protected]>
ericherman
added a commit
to ericherman/mariadb-server
that referenced
this pull request
Feb 4, 2026
Making mariadb's IO_SIZE compile-time configurable enables more straight-forward investigation of the performance implications of having an IO_SIZE which is different than the memory page size. The default IO_SIZE of 4096 as defined in include/my_global.h and also in libmariadb's include/ma_global.h matches to the memory page size of most systems. Larger page sizes are widely supported, called "huge pages" in Linux, "superpages" in FreeBSD, and "large pages" in MS Windows. On POSIX systems, obtaining the page size can be done via: page_size= sysconf(_SC_PAGESIZE); On Windows: SYSTEM_INFO si; GetSystemInfo(&si); page_size= si.dwPageSize; In https://jira.mariadb.org/browse/MDEV-35740 Marko highlights that there are vastly different uses of IO_SIZE. This "one size fits all" nature of IO_SIZE is not ideal, future work could split this into separate constants based upon usage. See also: mariadb-corporation/mariadb-connector-c#267 Signed-off-by: Eric Herman <[email protected]>
ericherman
added a commit
to ericherman/mariadb-server
that referenced
this pull request
Feb 4, 2026
Making mariadb's IO_SIZE compile-time configurable enables more straight-forward investigation of the performance implications of having an IO_SIZE which is different than the memory page size. The default IO_SIZE of 4096 as defined in include/my_global.h matches the memory page size of most systems. Larger page sizes are widely supported, called "huge pages" in Linux, "superpages" in FreeBSD, and "large pages" in MS Windows. On POSIX systems, obtaining the page size can be done via: page_size= sysconf(_SC_PAGESIZE); On Windows: SYSTEM_INFO si; GetSystemInfo(&si); page_size= si.dwPageSize; In https://jira.mariadb.org/browse/MDEV-35740 Marko highlights that there are vastly different uses of IO_SIZE. This "one size fits all" nature of IO_SIZE is not ideal, future work could split this into separate constants based upon usage. See also: mariadb-corporation/mariadb-connector-c#267 Signed-off-by: Eric Herman <[email protected]>
ericherman
added a commit
to ericherman/mariadb-server
that referenced
this pull request
Feb 4, 2026
Making mariadb's IO_SIZE compile-time configurable enables more straight-forward investigation of the performance implications of having an IO_SIZE which is different than the memory page size. The default IO_SIZE of 4096 as defined in include/my_global.h matches the memory page size of most systems. Larger page sizes are widely supported, called "huge pages" in Linux, "superpages" in FreeBSD, and "large pages" in MS Windows. On POSIX systems, obtaining the page size can be done via: page_size= sysconf(_SC_PAGESIZE); On Windows: SYSTEM_INFO si; GetSystemInfo(&si); page_size= si.dwPageSize; In https://jira.mariadb.org/browse/MDEV-35740 Marko highlights that there are vastly different uses of IO_SIZE. This "one size fits all" nature of IO_SIZE is not ideal, future work could split this into separate constants based upon usage. See also: mariadb-corporation/mariadb-connector-c#267 Signed-off-by: Eric Herman <[email protected]>
ericherman
added a commit
to ericherman/mariadb-server
that referenced
this pull request
Feb 4, 2026
Making mariadb's IO_SIZE compile-time configurable enables more straight-forward investigation of the performance implications of having an IO_SIZE which is different than the memory page size. The default IO_SIZE of 4096 as defined in include/my_global.h matches the memory page size of most systems. Larger page sizes are widely supported, called "huge pages" in Linux, "superpages" in FreeBSD, and "large pages" in MS Windows. On POSIX systems, obtaining the page size can be done via: page_size= sysconf(_SC_PAGESIZE); On Windows: SYSTEM_INFO si; GetSystemInfo(&si); page_size= si.dwPageSize; In https://jira.mariadb.org/browse/MDEV-35740 Marko highlights that there are vastly different uses of IO_SIZE. This "one size fits all" nature of IO_SIZE is not ideal, future work could split this into separate constants based upon usage. See also: mariadb-corporation/mariadb-connector-c#267 Signed-off-by: Eric Herman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was: #265
The server's definition of IO_SIZE is re-used here in the client for network buffer alignment, however IO_SIZE is used in the server for many different things and the client's buffer alignment is not related to many of those uses.
If the server is to make IO_SIZE configurable, we need to avoid either redefining it, or defining it to be different. By creating a specific define for this, we avoid redfine and clarify the code.
See: MariaDB/server#3726