Commit 494fc45
committed
Make IO_SIZE compile-time configurable
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.
Note that libmariadb's include/ma_global.h should also be adjusted to
avoid a double #define of IO_SIZE and to ensure they are defined to be
the same.
See: mariadb-corporation/mariadb-connector-c#265
Signed-off-by: Eric Herman <[email protected]>1 parent 16967b9 commit 494fc45
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
679 | 680 | | |
680 | | - | |
| 681 | + | |
| 682 | + | |
681 | 683 | | |
682 | 684 | | |
683 | 685 | | |
| |||
0 commit comments