View previous topic :: View next topic
|
Author |
Message |
thirumalasetty
New User
Joined: 17 Jun 2014 Posts: 13 Location: india
|
|
|
|
Hi, One of our batch jobs in production has beeb consuming a lot of CPU time and is topping the charts every week. This job is using a VSAM KSDS file with size of 5 million records (50,00,000) in it. Mentioned below are the specifics about CI/CA and CASIZE from DATA component of the VSAM file
CISIZE - 4096
CI/CA - 180
Total Records - 50,00,000
Hi-U-RBA - 5584158720
According to formula, BUFNI = 50,00,000 - (5584158720/(4096*180)) = 4262720.
Is this correct ? Do we really need to use this big number as BUFNI ??
Can someone please provide their suggestion to proceed further.
Thank you.
Rajesh. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
IMHO Your understanding of the formula was WRONG
BUFNI = INDEX_RECORDS - ... ... ...
not the total number of records. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
For batch processing, you have a very small data CI-size, but this may be OK depending on the following...
Before knowing what BUFNI would be useful, how is the file accessed? Is it the same in all uses?
To look to calculate something useful for BUFNI you need to look at the INDEX component on the LISTCAT. Number of index levels is important for non-sequential processing.
Although there may be a lot that can be done with this dataset, what makes you believe it is associated with your CPU-usage problem? BUFNI/BUFND usage is generally aimed at reducing IO. In very bad situations, it may reduce CPU, if you are overallocating buffers.
The short is, we don't have a clue, as you've given insufficient information.
Answering these questions will be a start, but I suspect you have a least two tasks: confirming/assessing/changing the VSAM definition, BUFNI/BUFND; looking at the CPU-usage in the program. |
|
Back to top |
|
|
thirumalasetty
New User
Joined: 17 Jun 2014 Posts: 13 Location: india
|
|
|
|
Hi Bill, Thank you for the reponse. Here are the answers for your queries;
1. confirming/assessing/changing the VSAM definition
Code: |
DEFINE CLUSTER(NAME(D956.EDIVK.PMASTER.V65.EDI.EDIOEA) -
VOLUME(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * )-
DATACLAS(DCEXTADR) -
CYLINDERS(200,200) -
FREESPACE(40,20) -
KEYS(125,0) -
RECORDSIZE(900,900) -
SHR(2,3)) -
DATA(NAME(D956.EDIVK.PMASTER.V65.EDI.EDIOEA.DATA) -
CISZ(4096)) -
INDEX(NAME(D956.EDIVK.PMASTER.V65.EDI.EDIOEA.INDEX)) |
2. CPU Usage
This is one of the high resource batch job runs 18 times a day, 7 days a week. The average duration (CPU time) this batch job is consuming according to the reports is 9 minutes per day.
We do not have access to program to look into. The program is from a third party tool (GENTRAN EDI Program). So, from our end we are trying to use the optimal BUFNI & BUFND usage for this particular VSAM KSDS file.
3. Index Levels from LIST CAT option;
INDEX
LEVELS - 3
ENTRIES / SEC - 13
Can you please let me know if am missing any information. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Is the file access sequential? random? skip sequential? If you do not know how the file is accessed, how do you expect to improve the processing time? Doing things such as using BLSR to improve random access typically causes no improvement (or worsens) sequential access -- and vice versa. Hence understanding the file access is critical to improving the batch job numbers.
What are the BUFND / BUFNI settings in the current batch job? How many inserts are done between redefines of the file? Are you getting CI / CA splits? With a 900-byte record size, the 4096 CI size seems pretty small unless nothing but random access occurs. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You have a licenced product. Presumably support is included in that, and hopefully some "service level" for how the product performs.
Rather than mess about, why don't you just ask for advice on the KSDS and an explanation of the high CPU? |
|
Back to top |
|
|
thirumalasetty
New User
Joined: 17 Jun 2014 Posts: 13 Location: india
|
|
|
|
Hi Robert:
1. We have opened a ticket with IBM Sterling to understand the file access method.
2. Currently there are no BUFNI & BUFND options being used in the program. We wanted to use some based on the suggestions.
3. '0' inserts are being done currently.
4. I see '0' CI / CA splits from the output of LIST CAT
Hi Bill:
Yes, I did open up a ticket with the vendor seeking their suggestion. I'll keep you posted about their reponse.
Thank you for your response and hopefully I'll be able to find out solution to improve the performance of this batch job.
Rajesh. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If there are no inserts, why is there freespace specified?
Why is it shareoptions(2,3)? Is something else able to update it whilst it is being read?
Is the same KSDS used in CICS? |
|
Back to top |
|
|
thirumalasetty
New User
Joined: 17 Jun 2014 Posts: 13 Location: india
|
|
|
|
Hi Bill, Yes there are no inserts but the VSAM KSDS file is being updated in each run. And, yes the same VSAM KSDS file is being used in CICS as well.
Thank you.
Rajesh. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If this same file is being used in CICS, have personnel from Tech Support or the CICS Sysprog review whether this file is a candidate for an LSR Pool assignment in the FCT.
If the file is NOT being updated in CICS at all, then it would be a candidate to be defined as a CICS Data-Table and LSR Pool assignments are unnecessary.
HTH.... |
|
Back to top |
|
|
thirumalasetty
New User
Joined: 17 Jun 2014 Posts: 13 Location: india
|
|
|
|
Hi,
Thank you for the suggestions / responses. I got an opportunity to work with the tech support group last few days and we have arrived at using BUFNI-10 & BUFND=10 option for the VSAM KSDS file that is carrying 5+ million records and we could see the performance is improved by 40 %. It would save a minimum of 80,000 CPU SECONDS per year on this job alone.
Thank you everyone for the support.
Rajesh. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
I'd strongly suggest you remove the CI & CA freespace as that just makes the file a lot larger than it needs to be. It also means you can only fit 2 records per CI when loading the file. If there's no inserts to the file after it's loaded there is no point at all in having freespace coded.
For the buffering you should only need BUFNI=3 if you have a 3 level index. And typically for BUFND if you specify 2 times the number of CI's that fit into a track plus 1 that will give you optimal batch performance. So BUFND=14 for a 4096 CISIZE. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Also consider how the KSDS is used in the batch job.
If records are retrieved / updated according to the data in a reference file, make sure that the reference file is sorted in KSDS key order. This means that you will only ever read / write each CI once so would only need minimal buffer allocations.
If your reference file is bouncing around all over the place you may well be reading and/or writing the same CI numerous times, but unfortunately after it has already been in a buffer that has been exhausted and refreshed causing the same CI to be read into storage many times. |
|
Back to top |
|
|
thirumalasetty
New User
Joined: 17 Jun 2014 Posts: 13 Location: india
|
|
|
|
Thank you for the suggestion.
1. Removing the freespace option sounds meaningful when there are no inserts after the file is getting loaded. I'll test this option with 3,14 buffer values for index and data buffers.
2. The reference file as of now is in sorted order. so we should be good with this one.
Thank you.
Rajesh. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Any chance you have the actual measured improvement(s)? |
|
Back to top |
|
|
|