[MCOL-5472] CPU wastes time in wait and sys b/c of urandom access in RowStorage. Created: 2023-04-11  Updated: 2023-12-15  Resolved: 2023-12-15

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 22.08.8, 23.02.1
Fix Version/s: 23.10.1

Type: Bug Priority: Blocker
Reporter: Roman Assignee: Roman
Resolution: Fixed Votes: 0
Labels: rm_perf

Issue Links:
PartOf
includes MCOL-5609 autotest for disk group by Closed
is part of MCOL-5460 concurrent CTE operation excessive mutex Stalled
Sprint: 2023-11
Assigned for Review: Sergey Zefirov Sergey Zefirov
Assigned for Testing: Kirill Perov Kirill Perov

 Description   

There is a stdlib random generator in RowStorage. Every time RowStorage is instantiated this random device tries to access urandom generator causing shared mutex contention and IO.
The suggested workaround is to either drop the random generator or put it into StorageManager.



 Comments   
Comment by Roman [ 2023-11-02 ]

Plz test this.
The changes affect disk-based aggregation control flow path. There is a probability condition that triggers disk-based aggregation before RAM depletes. The patch replaces stdlib random distribution with a custom one based on SplitMix64 algo. The only check would be to test that disk-based aggregation works means disk offload is triggered before RAM depletes.

Comment by Kirill Perov [ 2023-11-14 ]

Agreed with Roman to create autotest for disk group by to test this task.
https://jira.mariadb.org/browse/MCOL-5609

Comment by Kirill Perov [ 2023-12-12 ]

disk aggregation autotest implemented

Generated at Thu Feb 08 02:58:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.