|
Will you continue supporting Windows XP? |
Replies: 2 comments 1 reply
|
Switching to SRWL will slightly reduce the cost of locks, but it will have a very minor impact on overall performance. Actually libmdbx already has a substitute for SRWL used when running on Windows XP, but critical sections are still in use because ones provide deadlock detection/prevention (via native exceptions handling). Such detection is required to return an error code in case of invalid API usage, instead of a hard deadlock that looks like one or more processes are hanging somewhere inside libmdbx by an unknown reason. It is possible to implement us own deadlock detection mechanism for using SRWL, but this will slightly increase overhead, which will reduce the benefits of using SRWL in comparison with critical sections. So it makes very little sense without abandoning the use of file locks, which are used in libmdbx to share a database file in Windows. In turn, file locks are used to prevent unauthorized actions with the database file on the part of users. This decision was made about 10 years ago, based on the results of an analysis of a problematic case when the user had a centralized backup system:
The documentation indicated and explained why copying should be done using the Further, the cost of file locks contributes significantly only in scenarios where many small writing transactions are executed. But libmdbx is not targeted for such use cases, a current versions have high write amplification factor (due MVCC approach without WAL) and therefore do not show high performance. Most likely, even if we do away with file locks, writing data to storage media will become a next bottleneck in such scenarios. Nonetheless, the |
|
@orz--, my answer is quite long and detailed. I hope it becomes clear to you that the point is not to support older versions of Windows, but to reasonability of improvements while meet the expectations of database durability and foolproofing. |
Switching to SRWL will slightly reduce the cost of locks, but it will have a very minor impact on overall performance.
Actually libmdbx already has a substitute for SRWL used when running on Windows XP, but critical sections are still in use because ones provide deadlock detection/prevention (via native exceptions handling). Such detection is required to return an error code in case of invalid API usage, instead of a hard deadlock that looks like one or more processes are hanging somewhere inside libmdbx by an unknown reason.
It is possible to implement us own deadlock detection mechanism for using SRWL, but this will slightly increase overhead, which will reduce the benefits of using SRW…