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
 

 

How does BUFNO works? How to calculate optimal BUFNO ?

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

New User


Joined: 10 Jul 2006
Posts: 23

PostPosted: Sun Feb 28, 2010 9:44 am    Post subject: How does BUFNO works? How to calculate optimal BUFNO ?
Reply with quote

Hi all,

I am currently working on a re-engg project. In my current assignment... I am trying to bring down the

I/O time for all the datasets (sequential) by using the BUFNO.

1) How exactly the BUFNO works.. If this is assigned in JCL for a dataset... how does the Read stmt in

cobol pair with it.

2) I have a file with Record length 3000 bytes , block size 27000 how do i calculate the optimal BUFNO for

these kind of datasets.

3)Can BUFNO be used for SORTIN datasets for SYNCSORT or by default SYNCSORT calculates the optimal BUFNO by itself.


-Regards
Rahman.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Sun Feb 28, 2010 10:20 am    Post subject:
Reply with quote

1. BUFNO determines the number of buffers to assign to a particular DD name (data set). For QSAM (sequential) files, the default assignment is 5 buffers. When you execute a COBOL READ statement, the data is fetched from the data set (disk or tape or whatever) into a buffer and that buffer's data is what is actually available to COBOL. Note that a buffer is the size of a block, not the size of a record so the entire block is read into the buffer and one record at a time made available to your program. You can override the default BUFNO assignment via JCL parameter.

2. The record length doesn't matter for buffering. The block size is what determines the buffer size. Determining the optimal number of buffers usually involves your site support group as they may be aware of site requirements that could impact the value. I usually see good performance improvements up to one cylinder (30 27000 byte buffers) of buffer space; depending upon the machine and dasd speed more may be helpful but only testing will tell you for sure.

3. I'll let one of the SYNCSORT experts answer this.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Feb 28, 2010 10:22 am    Post subject:
Reply with quote

Hello,

Usually, more improvement will be seen by using a better BLKSIZE rather than changing BUFNO. . .

At the top of the page is a link to "IBM Manuals" among which are the JCL Reference for multiple versions of the Operating System. Using the flashlight/tubelight at the top left, search for BUFNO.

1. Buffers are memory used to hold data after it is read from the media and before it is used by the program code. This is automatic and is outside control of the program.
2. I'm not aware of a particular calculation.
3. Suggest you ask Syncsort support if you cannot find what you need in the Syncsort documentation.
Back to top
View user's profile Send private message
poshabrar

New User


Joined: 10 Jul 2006
Posts: 23

PostPosted: Sun Feb 28, 2010 10:36 am    Post subject: Magical numbers for BLKSIZE!!
Reply with quote

Hi Robert /scherrer,

Thanks a lot for your quick response on my query.


I have been looking for some script that would give me an indept knowledge about this simple parameter..(BUFNO) i came accross the following :

***********************
If you really need to do I/O then at least do it as neatly as possible.

1) Use of BUFNO for sequential Datasets:

When dealing with sequential DASD datasets, MVS does some performance tuning behind your back. Instead of dealing in 1 block chunks it now deals in 5 block chunks. What this means is that for the following blocked datasets you actually deal with larger chunks of data.

BLKSIZE BUFNO=5

22000 110,000 bytes gotten per access

6160 30800 bytes gotten per access

Thus when reading a 22,000 byte blocked dataset, MVS really works with 110,800 bytes chucks by default. The objective being met here is to minimize the amount of requests made to MVS's I/O subsystem, an expensive option.

But is 5 buffers enough? In today's environment, the answer is simple => NO. You should consider coding more. Another factor that comes into play at this time is if you exceed multiples of 31 buffers or 249,856 total bytes, then MVS will break your request into 2 or more parts and do Parallel I/O thus reducing the amount of time required to run I/O bound jobs. For example a job that read 100,000 240 byte records blocked at 24,000 took 8 seconds to run, but with 33 buffers it took only 6.5 seconds. If this job did a lot of process between request for data records the response time would decrease more!

You must also recognize that by increasing the BUFNO your job now require extra MEMORY, which can have an impact on your run time. In fact coding too many buffer can slow things down. Never code BUFNO < 5 unless you really understand the implications, and finally do not over code BUFNO, if you dataset is only 100K in size, don't code 200K of buffer space.

Also don't bother with this parm for SORTIN, SORTWK, or SORTOUT (sort datasets). Sort does its own special I/O processing to reduce EXCP and coding BUFNO will only confuse it.

2) Better Blocking of datasets.

Yes 6160 is another magic number, recommended 10 odd YEARS ago. It no longer as any value other than a magic number. Try and get as close as possible to 22,340 for DASD datasets. This rule does not apply to TAPE where 32767 block area always optimal. As a side point watch blocksizes when you concatenate datasets.

***************************

Can any one tell me the numbers mentioned here as "MAGICAL" are really correct and will work out almost all the time??
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Feb 28, 2010 12:29 pm    Post subject: Reply to: How does BUFNO works? How to calculate optimal BUF
Reply with quote

Quote:
Try and get as close as possible to 22,340 for DASD datasets.


where did You find that number ? ( throw away that manual anyway)

i would trust more SMS judgement about half track blocking...
for the most common dasd architecture the optimum blksize is near the half track size 27998
obviously a trade off must be made sometimes also on dasd utilization
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Mar 01, 2010 9:56 am    Post subject:
Reply with quote

I'm fairly certain that both DFSORT and SYNCSORT use their own buffering and ignore what you've defined. I don't know about CA-SORT.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 241
Location: Cincinnati OH USA

PostPosted: Mon Mar 01, 2010 11:49 pm    Post subject:
Reply with quote

and today's DASD and virtual tape devices have controllers monitoring behavior of disk accesses and use their own controller cache to anticipate next reads and delayed writes to expedite/lessen time spent getting data to/from their actual physical devices.
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 How to calculate an specific transact... lind sh CICS 2 Tue Sep 13, 2016 9:20 pm
No new posts How Adabas works in Mainframe ranujn Java & MQSeries 5 Sat Jun 04, 2016 11:20 am
No new posts Optimal code to check the efficiency prino PL/I & Assembler 1 Fri Jan 15, 2016 12:05 am
No new posts Calculate a timeframe with DFsort Gerd Hofmans DFSORT/ICETOOL 6 Thu Jan 14, 2016 5:30 pm
No new posts Optimal Space parameters for a dataset Vasanthr JCL & VSAM 2 Fri Jan 23, 2015 9:13 am


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