Posted: Tue Jul 22, 2014 4:41 am Post subject: VSAM Bufnd, Bufni and CI/CA
Hi,
Please help me in identifying the BUFNI and BUFND for the below vsam file.
When I access this file sequentially, what should be my BUFND, BUFNI
When I access this file Randomly, what should be my BUFND, BUFNI
When I access dynamically :
1. More sequential and Less random, what should be my BUFND, BUFNI
2. Less sequential and More random, What should be my BUFND, BUFNI.
Also please advice how should I allocate CISZ for index and data for the below vsam file.
1. If I have more random access
2. If I have more sequential access.
My understanding :
For sequential access
BUFND will be CI/CA of data which is 33 adding 1 sequence set it is 34. BUFND=34 and No BUFNI
For Random access
Code:
CISZ CI/CA HI U RBA TI CASZ BUFNI
22528 33 13044860928 17611 743424 65
BUFNI=65,BUFND=34
Please advice one dynamic allocation i.e more sequential and less sequential.
Do you need those SHAREOPTIONS (2,3)? I'm pretty sure they're going to mess you up. Because another task can have the file open for update, a sequential read is not going to use the sequence set.
Do a before LISTCAT, REPRO to a PS, then an after LISTCAT.
Then use ALTER to change it to shareoptions 1,3. Run the before/REPRO/after again. (if you've not read the data in the meantime, you can skip the before LISTCAT on this one).
Use BUFNI and BUFND of 50. This is not to see how wonderful BUFNI of 50 is (it probably won't be) but to see them under equal conditions. What we'd be looking for is a big change in the number of I/Os as the second REPRO will use the sequence set, and the first one not.
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
Posted: Tue Jul 22, 2014 5:24 am Post subject:
There is no 'rule of thumb for the calculation of VSAM buffers for a file.
For sequential I usually use between 5 and 10 for BUFND and 3 for BUFNI.
For RANDOM access one of the best tips is to sort the reference file into the order of the keys of the VSAM file. This means that you will only ever read the index and data portions only once to process the reference file. If it isn't sorted you could be loading the same index and data CI multiple times throughout the job.
If you are using SKIP SEQUENTIAL access remember that every time that you change access from RANDOM / KEYED to SEQUENTIAL you will flush all of the buffers, so probably best to keep to the system defaults.
Also consider that the more buffers you allocate the more storage you will consume, be it physical or virtual. _________________ If it's true that we are here to help others,
then what exactly are the others here for ?
There is no 'rule of thumb for the calculation of VSAM buffers for a file.
My understanding if we have CI/CA + 1 will help in reading full cylinder at a time. Please advice
expat wrote:
For sequential I usually use between 5 and 10 for BUFND and 3 for BUFNI.
For sequential read, please advice why we need index buffer.
William Collins wrote:
Do you need those SHAREOPTIONS (2,3)? I'm pretty sure they're going to mess you up. Because another task can have the file open for update, a sequential read is not going to use the sequence set.
This is a file used in Online, so I think they have given 2,3 option, while batch is running, online will be down, Only one job update it at a time and rest of the jobs wait for the update to complete.
William Collins wrote:
Use BUFNI and BUFND of 50. This is not to see how wonderful BUFNI of 50 is (it probably won't be) but to see them under equal conditions. What we'd be looking for is a big change in the number of I/Os as the second REPRO will use the sequence set, and the first one not.
My understanding was having some random buffer number is not advisable.
But not sure..
If only one task can update at a time, and you don't need to read it whilst it is open for update, you don't need 2,3.
Data records on a KSDS can be splattered all over the place. The index tells AMS where the next record is. For sequential processing, only the lowest-level index is needed, the so-called isequence-set. The sequence-set contains horizontal links to the next index in the sequence-set, so only the lowest-level index is needed for sequential processing. BFUNI=1 is sufficient, greater than one may save a few IOs, but not substantially.
With 2,3, I think the entire index is used for sequential processing, so each index record may be read multiple times. Try it out as I suggested and let us know.
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
Posted: Tue Jul 22, 2014 8:22 am Post subject:
Magesh_J wrote:
My understanding if we have CI/CA + 1 will help in reading full cylinder at a time. Please advice
Possibly in the first instance, but as each buffer is exhausted it will be refreshed by the next CI to be read in. The buffers are allocated enough memory for one CI, not one CA.
Magesh_J wrote:
For sequential read, please advice why we need index buffer.
If you only use a single index buffer you have to wait for that buffer to be finished with before it can be refreshed. With multiple buffers they will be refreshed as and when they are exhausted.
It may also be worth a chat with your storage management people to see if they are using SMB - Sytem Managed Buffering which does everything for you _________________ If it's true that we are here to help others,
then what exactly are the others here for ?
Sorry here after will search entire website, I searched in Data Management, didn't search in application programing.
As per your advice gone thru the PDF and come to know SMF is doing this job for us. Same was mentioned by expat
My understanding are follows.
Small CI data allocation for Random access
Large CI data allocation for sequential access.
1. More sequential and Less random, what should be my BUFND, BUFNI
AMP=('ACCBIAS=SW')
2. Less sequential and More random, What should be my BUFND, BUFNI
AMP=('ACCBIAS=DW')
3. only Random => AMP=('ACCBIAS=DO')
4. only Sequential ==> AMP=('ACCBIAS=SO')
PPT is in little high level for me to understand, but some of things I could understand.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum