[Info-vax] Reading Sequentially through an Indexed File...
Hein RMS van den Heuvel
heinvandenheuvel at gmail.com
Sun May 20 12:59:51 EDT 2018
On Wednesday, May 16, 2018 at 12:38:24 PM UTC-4, Doc Trins O'Grace wrote:
> Very generally speaking:
>
> On a OpenVMS V8.4 Itanium: with SET/RMS/QUERY=DISABLE; only doing $GETs (with NLK+RRL bits set), on an indexed file... all other things being equal. Are there any performance benefits to be garnered by opening the file exclusively versus shared?
>
> Thank you!
Hi Scott
> On a OpenVMS V8.4 Itanium: with SET/RMS/QUERY=DISABLE; only doing $GETs (with NLK+RRL bits set),
If you have the option, then consider using NQL - No (record) Query Lock.
That way the code is not dependent on the process or system query lock setting.
> Are there any performance benefits to be garnered by opening the file exclusively versus shared?
Yes, and they can be significant.
In shared mode every record read will cause a buck lock convert up and down.
And when a bucket is first accessed a full ENQ (and DEQ later).
So with 1 row/bucket that's and ENQ + DEQ per record anyway.
With 10 rows/bucket that 1 ENQ + DEQ and 20 CVTs per 10 rows.
With no sharing there is just the file lock, once, and it may well help a lot.
20 years ago that would be noise compared to disk access, io driver.
Now, this can be significant kernel mode time, and even lead to MPsync waste.
Now with recent (8.3+ ?) OpenVMS, and a handful of global buffers, the bucket lock will be cached, and shared and outperform unshared again.
As always... it depends, and you should really just try.
For full understanding you may want to use may (C) variant of LIB$SHOW_TIMER which reports USER, EXEC, KERNEL time.
Cheers,
Hein
More information about the Info-vax
mailing list