Commit 5a19920
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 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]>1 parent a40231e commit 5a19920
3 files changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
194 | 203 | | |
195 | 204 | | |
196 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
| 555 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | 667 | | |
679 | 668 | | |
680 | 669 | | |
| |||
0 commit comments