z/TPF - Group home

Pre allocated ECB buffer restriction Q&A by Ken Warner

  

Preallocated storage provides a way to anticipate general application storage requests and associate it with an ECB as it gets created.  Preallocated ECB heap is one of the types of storage which can be allocated this way.  Data Collection can provide general ECB usage statistics that can then be used to fine tune ECB configurations like preallocation.


Here are some Q/As about preallocated ECB heap, which are not specifically mentioned in the TPF documentation, but might be useful:

Q.  Our data collection report suggests that more pre-allocated ECB heap AVL1 buffers
would improve performance, however the ZCTKA ALTER entry only allows a total of 150 for
all AVL1-AVL4 buffers. Why is this 150 buffer restriction so low? Currently the AVL1-AVL4 buffer allocation is less
than 20% of the total PEH value which is set at 100.

A.   ECB heap has a control table that keeps information about each ECB heap buffer for the associated ECB.  This ECB heap control table is ECB unique.  The initial ECB heap control table for an ECB has 150 entries in it.  If more than 150 buffers are used, system heap is obtained for the control table.  For each ECB heap buffer that is allocated in an AVL list, it must have an ECB heap control table entry.  Because the initial ECB heap control table has 150 entries, the number of AVL entries is limited to 150.  The number 150 was chosen because it is a good fit into the 5 4K frames that are used for the initial ECB heap control table allocation.

For more information, see Dr. Bob Blackburn's presentation "Performance and Reliability Topics" from the 2013 TUG: http://www.ibm.com/support/docview.wss?uid=swg21617931

Q.  Do the buffer size values (HAVSZx) have any effect if the number allocated (HAVLx) values are zero?

A.  The buffer size HAVSZx parms still take effect for AVL1-AVL4 lists.

Q.  Can the same buffer  get reused after a free()?

A.  If HAVL1=0, then each malloc/free allocates the same heap buffer and then puts it back on the AVL1 list for reuse.
If HAVL1=4, then each ECB starts with 4 buffers on its AVL1 list. The first malloc takes the first buffer off of the
AVL1 list and then the free puts the buffer back on the end of the AVL1 list. The second malloc takes the second
buffer off of the AVL1 list and the free puts it back on the end of the AVL1 list, etc.

Q.  What is the cache line unit size?

A.  The cache line size is 256.