Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Clarification regarding BUFNI & BUFND parameters usage

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
thirumalasetty

New User


Joined: 17 Jun 2014
Posts: 13
Location: india

PostPosted: Tue Jun 17, 2014 8:22 pm    Post subject: Clarification regarding BUFNI & BUFND parameters usage
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jun 17, 2014 8:43 pm    Post subject: Reply to: Clarification regarding BUFNI & BUFND paramete
Reply with quote

IMHO Your understanding of the formula was WRONG

BUFNI = INDEX_RECORDS - ... ... ...

not the total number of records.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue Jun 17, 2014 8:51 pm    Post subject: Reply to: Clarification regarding BUFNI & BUFND paramete
Reply with quote

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
View user's profile Send private message
thirumalasetty

New User


Joined: 17 Jun 2014
Posts: 13
Location: india

PostPosted: Tue Jun 17, 2014 10:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7909
Location: Bellevue, IA

PostPosted: Wed Jun 18, 2014 1:30 am    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jun 18, 2014 4:43 am    Post subject: Reply to: Clarification regarding BUFNI & BUFND paramete
Reply with quote

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
View user's profile Send private message
thirumalasetty

New User


Joined: 17 Jun 2014
Posts: 13
Location: india

PostPosted: Wed Jun 18, 2014 5:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jun 18, 2014 5:42 pm    Post subject: Reply to: Clarification regarding BUFNI & BUFND paramete
Reply with quote

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
View user's profile Send private message
thirumalasetty

New User


Joined: 17 Jun 2014
Posts: 13
Location: india

PostPosted: Wed Jun 18, 2014 6:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jun 18, 2014 6:55 pm    Post subject: Reply to: Clarification regarding BUFNI & BUFND paramete
Reply with quote

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
View user's profile Send private message
thirumalasetty

New User


Joined: 17 Jun 2014
Posts: 13
Location: india

PostPosted: Thu Jun 26, 2014 6:50 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Tue Jul 22, 2014 8:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 22, 2014 8:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
thirumalasetty

New User


Joined: 17 Jun 2014
Posts: 13
Location: india

PostPosted: Wed Jul 23, 2014 12:07 am    Post subject: Reply to: Clarification regarding BUFNI & BUFND paramete
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Jul 23, 2014 1:04 am    Post subject:
Reply with quote

Any chance you have the actual measured improvement(s)?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts Multiple parameters Csongor All Other Mainframe Topics 16 Thu Jun 09, 2016 7:54 pm
No new posts SYSUT2 - CONFLICTING DCB PARAMETERS raulravi7 JCL & VSAM 6 Thu May 19, 2016 9:43 am
No new posts Need clarification of VSAM FCT and DF... pkmurali CICS 15 Sun Apr 10, 2016 1:06 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us