[Info-vax] If sensitive with ! Data misalignment - Impacts codes/system performances

A famous IT technical writer Philippe.vouters at laposte.net
Thu Dec 8 11:43:00 EST 2011


On Dec 8, 4:52 pm, "John Reagan" <johnrrea... at earthlink.net> wrote:
> "A famous IT technical writer" <Philippe.vout... at laposte.net> wrote in
> messagenews:39464d28-b1dc-4de1-9153-5d5d08d05281 at w1g2000vba.googlegroups.com...
>
> > Dear reader,
>
> > If sensitive with unaligned data which impacts more or less codes/
> > system performances on every processor architecture, three special
> > studies on OpenVMS systems highlighting the benefit of data alignment:
> >http://vouters.dyndns.org/tima/OpenVMS-Cobol-Effect_of_the_ALIGN_comp...
> > (read the FOREWORD section; the obtained performance figures call for
> > no discussion)
>
> The section about COBOL is actually showing a bug in the COBOL compiler that
> I fixed for the V2.9 release.  For COBOL, the /ALIGN qualifier will NEVER
> make alignment faults increase or decrease for COBOL generated code.  If the
> COBOL compiler knows the data is aligned, it will use more efficient
> instructions.  If it knows the data is unaligned, it will use more
> instructions to avoid the alignment fault.  The compiler should never
> generate code that would cause an alignment fault on something it clearly
> knows is unaligned.  [That was the bug in V2.8.]
>
> However, you can get alignment faults if you pass COBOL data onto other
> routines (like the DECForms example listed below).  DECForms clearly has
> some assumptions that the data passes is naturally aligned.  COBOL's /ALIGN
> will affect that.
>
> >http://vouters.dyndns.org/tima/OpenVMS-IA64-Unaligned_data_accesses.html
> > (a study of the HP C compiler generated machine code on Itanium
> > processors when data is aligned or unaligned along with the
> > corresponding pseudo-algorithm)
>
> There is a Heisenberg issue with the study.  As Philippe notes, on Alpha,
> ALL unaligned access trap to the PAL code without OpenVMS knowing about it.
> On Itanium, some are handled on-chip and others are signalled back to
> OpenVMS (since there is no PAL code).
>
> However, when you start tracking alignment faults either with the SDA FLT,
> with the DEBUGer's SET BREAK /UNALIGNED, with the various alignment fault
> tracking system services, then:
>
> On Alpha, the PAL code cannot just silently fixed up and continue, but
> rather it fixes the fault AND signals to OpenVMS so you can take the
> breakpoint, etc.
>
> On Itanium, we tell the chip to stop doing on-chip fixups and report ALL
> alignment faults to OpenVMS since somebody wants to count them, take a
> breakpoint, etc.
>
>
>
>
>
>
>
> >http://vouters.dyndns.org/tima/OpenVMS-Alpha-IA64_Misaligned_pointers...
> > (a performance impact study on both Alpha and Itanium processors of
> > misaligned pointers)
>
> > Aligned data is what HP suggests in all its literature but does not
> > always respect what it states for some products it sells:
> >http://vouters.dyndns.org/tima/OpenVMS-DECForms-DECForms_misalignment...
>
> > If you have been interest with, I shall be glad. This will mean more
> > performant codes over the market to the benefit of every end-users.
> > For your company, this will lead to your customers satisfactions,
> > possibly impacting revenues.
>
> > Philippe Vouters

Dear John,

Thank you so much to bring in your precisions. A quick check tells me
you are consciously set as the technical contributor for the
misaligned pointers article. Anyhow and without alignments faults, the
performances may reveal really poor on misaligned pointers with the /
assume=(NOALIGNED_OBJECTS) HP C compiler qualifier or unaligned data
with the /nomember_alignment HP C compiler qualifier. For these
reasons, it is often best for performances reasons to attempt to align
data..

Unaligned packed data may reveal important for network bound
applications where the network is the true bottleneck. As well and in
this case, you may use compression/decompression algorithms to ensure
the volume of network traffic to be kept at a minimum.

I have never tested the impact of data alignment/misalignment on disk
I/Os. If someone has an input to give on this, he remains welcomed.

Yours truly,
Philippe



More information about the Info-vax mailing list