Increasingly customers are using 1MB and 2GB page frames. Recent experiences with them managing these areas have led me to writing this post. It’s about the two LFAREAs. 1
In the following I’m going to prefer to say “page” instead of “page frame” – unless the meaning would be unclear.
What Is The Point Of A Large Frame?
To speed Dynamic Address Translation (DAT) mainframe cores have Translation Lookaside Buffers (or TLB entries).
The purpose of DAT – a feature of virtual memory operating systems – is to translate virtual storage page addresses to real storage frame addresses. (Of course a virtual storage frame might not have one – if it has been paged or swapped to disk or not yet touched.2)
The TLB is small and cannot cover all of virtual memory. 3
If a translation operation cannot find a TLB entry some extra CPU is consumed performing the translation.
So we want as high a TLB hit ratio as possible.
Traditionally a TLB entry has covered a 4KB page – and most still do.
As z/OS systems’ memory sizes have increased the TLB hit ratio has declined; The larger the system the worse this is likely to be.
First 1MB pages were introduced – where 1 TLB entry covers 1MB of virtual and real storage. This can greatly improve the TLB hit ratio for the affected pages.
Later on 2GB pages were introduced. This has the potential to improve TLB hit ratios for the affected pages still further.
These page sizes are requested by the application, the most common or sizeable being Db2 or JVM heaps.
Most of the rest of this post is about controls on the amount of memory that can be in 1MB and 2GB pages. It’s important to
- Avoid wastage of real memory.
And
- Ensure requests for large pages are effective.
The two LFAREAs behave differently. Understanding their differences is key to both of these.
The instrumentation rounds out this post nicely.
1MB LFAREA
Before z/OS 2.3 the 1MB LFAREA carved out real storage for 1MB pages and it couldn’t be used for 4 KB pages.
With z/OS 2.3 it is now a limit:
If applications attempt to acquire 1MB pages and there aren’t sufficient left in the 1MB LFAREA the acquisition will fail. It is up to the requester to handle this situation as they see fit; In all likelihood some or all of the virtual storage will be backed with 4KB ones.
So you need to specify a 1MB LFAREA at least as large as your peak requirement. Importantly, there is no downside to overspecification.
2GB LFAREA
The 2GB LFAREA carves out real storage for 2GB pages and it can’t be used for smaller page sizes.
Overspecification leads to unusable memory – and should be minimised.
Underspecification leads to disappointment – in the same way underspecifying the 1MB LFAREA does.
So here it’s a balance – and quite a difficult one.
Instrumentation
This is perhaps my favourite topic.
There is instrumentation at the system and at the address space level:
System
For memory, SMF Type 71 records are essential.
You get both the LFAREA specifications and usage – for both page sizes. (In fact all 3.) This enables you to assess whether the limits are too high or too low.
For 1MB LFAREA the limit is in field SMF71LFA and the available value is SMF71L7A. Obviously you can get the usage by subtraction. These values are in MB so I turn them into GB. One day even that might not be adequate.
When it comes to service classes and report classes there are no extra fields in the SMF Type 72 Subtype 3 records. My code subtracts the total workload memory usage from what’s left when you take out the other uses of in-use frames. 1MB frames come out of that.
For 2GB LFAREA the limit is in field SMF71GFA and the average used value is SMF71GUA. Obviously you can get the free by subtraction. These values are in 2GB pages so I turn them into GB.
2GB frames are “special”: Unused 2GB page frames are not counted in SMF 71’s Available Frame Queue metrics; I treat them separately (and get their size by subtraction SMF71GUA from SMF71GFA).
For neither page size can you calculate “would be pages” from RMF.
Db2 has information in its DISPLAY BUFFERPOOL command response – but that is obviously only one exploiter.
(DISPLAY BUFFERPOOL can tell you how many pages were 2GB and how many were 1MB, for instance.)
Address Space
Address spaces are – in a general sense – instrumented with SMF Type 30 records:
- Interval records are useful for understanding the fluctuations in usage.
- Step- and Job-End records are useful in the batch context.
Both give you 1MB and 2GB page usage. You get both the “who” and “how much”. This feeds into my quest for taxonomy.
Conclusion
The controls for 1MB and 2GB are different – and more forgiving in the 1MB case.
Most of the benefit is in using 1MB pages and 2GB is just a little bit more. That statement would be misleading for anyone reading this in 2036 – as memory configurations will have vastly grown by then (despite the true-in-2026 AI memory land grab).
For most customers my view is 1MB pages are probably the best choice.
In either case there is instrumentation to help you size the two LFAREAs and figure out who’s using them.
Our code uses this instrumentation – and I’ve seen both underspecification and underuse – across numerous customers.
And I have prototype code that graphs the use of these two areas – but it could use work when I get a spare moment. Perhaps the centrepiece of another post.
Making Of
This was largely written on a plane back from South Africa, where I spent happy days talking to (or more correctly at) two customers I know well.
I actually wrote it on an iPhone – so a glass keyboard. Not ideal and here I rely heavily on its ability to correct typos. (On that last sentence I typed “Inrely” and it couldn’t correct it – a failure I encounter often.)
Oh, and footnotes return. A two edged sword for those who actually read them – as non-readers get a smoother flow and readers of them flip back and forth. (I blame the late great Terry Pratchett.)
-
Technically I should say “large page frame areas” but most people would go with “LFAREAs”, even though that is the name of the specifications. ↩
-
For decades virtual storage use exceeded real storage availability and paging was essential. Now real storage is relatively abundant and paging is rare. ↩
-
Like Level 1 Cache it’s small and fast. ↩

