The Question is:
We have a large number of C executables that run on dedicated servers (no
interactive users). The programs we're ported from VAX C and (for a few
reasons) compiled with /NOMEMBER_ALIGN.
Now we need to improve CPU performance. Is there a way, short of using a
debug script, to estimate how much CPU is wasted due to unaligned data? The
effort to shift to natural alignment will be large so we'd like to be
confident that the effort will giv
e us the CPU boost we need.
The Answer is :
Performance-related questions are exceedingly difficult to answer
without rather more data -- a more to naturally-aligned data can
be a significant performance improvement, but it may or may not
be a factor here.
The usual approach when tuning an application is to determine the
particular factor consuming the particular (constrained) resource,
via a tool such as the performance and coverage analyzer (PCA).
Using an analyzer tool -- or built-in analysis logging -- you can
determine which routines and which activities are consuming the
(constrained) resource, and work to remove the particular limit.
Without the availability of the necessary performance data, the
programmer is left to guess at the particular bottleneck -- and
(of course) the programmer may or may not guess correctly.
That said, the use of /NOMEMBER_ALIGN is a rather large hammer, and
generally not recommended -- marking the specific data structure(s)
requiring unaligned storage (via #pragma) is recommended, while a move
to natural data alignment is (obviously) preferable whenever possible.
For information on collecting and reporting data on alignment faults,
please see the following (and related) OpenVMS system services: