mariadb/mysql-test/suite/maria
Monty 52c29f3bdc MDEV-35469 Heap tables are calling mallocs to often
Heap tables are allocated blocks to store rows according to
my_default_record_cache (mapped to the server global variable
 read_buffer_size).
This causes performance issues when the record length is big
(> 1000 bytes) and the my_default_record_cache is small.

Changed to instead split the default heap allocation to 1/16 of the
allowed space and not use my_default_record_cache anymore when creating
the heap. The allocation is also aligned to be just under a power of 2.

For some test that I have been running, which was using record length=633,
the speed of the query doubled thanks to this change.

Other things:
- Fixed calculation of max_records passed to hp_create() to take
  into account padding between records.
- Updated calculation of memory needed by heap tables. Before we
  did not take into account internal structures needed to access rows.
- Changed block sized for memory_table from 1 to 16384 to get less
  fragmentation. This also avoids a problem where we need 1K
  to manage index and row storage which was not counted for before.
- Moved heap memory usage to a separate test for 32 bit.
- Allocate all data blocks in heap in powers of 2. Change reported
  memory usage for heap to reflect this.

Reviewed-by: Sergei Golubchik <serg@mariadb.org>
2025-01-05 16:40:11 +02:00
..
alter.result
alter.test
aria_log_dir_path.result
aria_log_dir_path.test
aria_pack_mdev14183.result
aria_pack_mdev14183.test
aria_sort_buffer.result
aria_sort_buffer.test
bulk_insert_crash.opt
bulk_insert_crash.result
bulk_insert_crash.test
collations.result
collations.test
compat_aliases-master.opt
concurrent.result
concurrent.test
create.opt
create.result
create.test
ctype_utf8mb3_uca.result
ctype_utf8mb3_uca.test
disabled.def
distinct.result
distinct.test
dynamic.result
dynamic.test
encrypt-no-key.result
encrypt-no-key.test
encrypt-wrong-key.result
encrypt-wrong-key.test
fulltext2.result
fulltext2.test
group_commit.result
group_commit.test
icp.result
icp.test
insert_select-7314.result
insert_select-7314.test
insert_select.result
insert_select.test
kill.result
kill.test
lock.result
lock.test
locking.result
locking.test
maria-64bit.result
maria-64bit.test
maria-autoinc.result
maria-autoinc.test
maria-autozerofill.result
maria-autozerofill.test
maria-big.result
maria-big.test
maria-big2.result
maria-big2.test
maria-connect.result
maria-connect.test
maria-gis-recovery.opt
maria-gis-recovery.result
maria-gis-recovery.test
maria-gis-rtree-dynamic.result
maria-gis-rtree-dynamic.test
maria-gis-rtree-trans.result
maria-gis-rtree-trans.test
maria-gis-rtree.result
maria-gis-rtree.test
maria-mvcc.result
maria-mvcc.test
maria-no-logging.result
maria-no-logging.test
maria-page-checksum.result
maria-page-checksum.test
maria-partitioning.result
maria-partitioning.test
maria-preload.result
maria-preload.test
maria-purge.result
maria-purge.test
maria-recover-master.opt
maria-recover.result
maria-recover.test
maria-recovery-big-master.opt
maria-recovery-big.result
maria-recovery-big.test
maria-recovery-bitmap-master.opt
maria-recovery-bitmap.result
maria-recovery-bitmap.test
maria-recovery-master.opt
maria-recovery-rtree-ft-master.opt
maria-recovery-rtree-ft.result
maria-recovery-rtree-ft.test
maria-recovery.result
maria-recovery.test
maria-recovery2-master.opt
maria-recovery2.result
maria-recovery2.test
maria-recovery3-master.opt
maria-recovery3.result
maria-recovery3.test
maria-ucs2.result
maria-ucs2.test
maria.result
maria.test
maria2.result
maria2.test
maria3.result
maria3.test
maria_notembedded.result
maria_notembedded.test
maria_partition.result
maria_partition.test
maria_showlog_error.result
maria_showlog_error.test
max_length.result
max_length.test
mrr.result
mrr.test
optimize.result
optimize.test
partition.result
partition.test
ps_maria.result
ps_maria.test
range.result
range.test
repair-big-sort.result
repair-big-sort.test
repair.result
repair.test
rollback.result
rollback.test
small_blocksize-master.opt
small_blocksize.result
small_blocksize.test
suite.pm
system_tables.result
system_tables.test
temporary.result
temporary.test
transaction.result
transaction.test
truncate.result
truncate.test