[MDEV-32228] Optimize is_file_on_ssd() to speedup opening tablespaces on Windows Created: 2023-09-22  Updated: 2023-09-25  Resolved: 2023-09-22

Status: Closed
Project: MariaDB Server
Component/s: Platform Windows, Storage Engine - InnoDB
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: performance

Issue Links:
Relates
relates to MDEV-32027 Opening all .ibd files on InnoDB star... Closed

 Description   

is_file_on_ssd() on Windows uses a cache to avoid repeated checks whether a given volume is on SSD.

However, it still uses GetVolumePathName() to retrieve volume for any given file.
GetVolumePathName() appears to be expensive, procmon shows that internally it opens every directory in the hierarchy, probably to check whether directory is a symlink.

This can be improved by using volume serial ID as cache key instead, it is cheap to retrieve it for an open file.


Generated at Thu Feb 08 10:29:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.