<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Does &amp;quot;MISALGNDSTRCT&amp;quot; affect CPU performance in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146874#M88517</link>
    <description>Yes. Accesses to misaligned data will affect CPU performance. How much depends on the processor, and how good the compiler is at detecting misaligned accesses.&lt;BR /&gt;&lt;BR /&gt;For VAX you can expect an unaligned access to be between 1.5x and 3x more expensive than a similar aligned access (but then aligned accesses are more expensive than they need to be, because the microcode paths contain checks for misalignment).&lt;BR /&gt;&lt;BR /&gt;On Alpha unaligned will be about 10x if the compiler knows about it and about 100x if it doesn't.&lt;BR /&gt;&lt;BR /&gt;On IA64 it starts at about 100x and goes up.&lt;BR /&gt;&lt;BR /&gt;If you care about performance, you'll align all you data. All platforms will benefit, but especially IA64</description>
    <pubDate>Tue, 19 Feb 2008 03:13:56 GMT</pubDate>
    <dc:creator>John Gillings</dc:creator>
    <dc:date>2008-02-19T03:13:56Z</dc:date>
    <item>
      <title>Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146872#M88515</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;   There are many alignment fault in the appliance.Anyone knows whether "MISALGNDSTRCT" affect CPU performance seriously?&lt;BR /&gt;  &lt;BR /&gt;   Thanks.</description>
      <pubDate>Tue, 19 Feb 2008 00:00:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146872#M88515</guid>
      <dc:creator>Tru64Unix</dc:creator>
      <dc:date>2008-02-19T00:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146873#M88516</link>
      <description>Depends upon the CPU.  For Alpha processors, it has a moderate effect as the fixup is taken care of in PAL code.  For Integrity it is very expensive, as it traps to part of the operating system that has to fix it up.</description>
      <pubDate>Tue, 19 Feb 2008 02:15:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146873#M88516</guid>
      <dc:creator>Richard Whalen</dc:creator>
      <dc:date>2008-02-19T02:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146874#M88517</link>
      <description>Yes. Accesses to misaligned data will affect CPU performance. How much depends on the processor, and how good the compiler is at detecting misaligned accesses.&lt;BR /&gt;&lt;BR /&gt;For VAX you can expect an unaligned access to be between 1.5x and 3x more expensive than a similar aligned access (but then aligned accesses are more expensive than they need to be, because the microcode paths contain checks for misalignment).&lt;BR /&gt;&lt;BR /&gt;On Alpha unaligned will be about 10x if the compiler knows about it and about 100x if it doesn't.&lt;BR /&gt;&lt;BR /&gt;On IA64 it starts at about 100x and goes up.&lt;BR /&gt;&lt;BR /&gt;If you care about performance, you'll align all you data. All platforms will benefit, but especially IA64</description>
      <pubDate>Tue, 19 Feb 2008 03:13:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146874#M88517</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-02-19T03:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146875#M88518</link>
      <description>Tru64Unix,&lt;BR /&gt;&lt;BR /&gt;Misaligned data always affects performance. Worse yet, it does not necessarily show up on the CPU usage.&lt;BR /&gt;&lt;BR /&gt;Even for VAX, where the architecture did not officially penalize one for having unaligned data, it potentially forced a double fetch ("potentially" because it might have already been in the cache).&lt;BR /&gt;&lt;BR /&gt;On Alpha, the fault is expensive, and on Itanium, the fault is even more expensive. &lt;BR /&gt;&lt;BR /&gt;In virtually every case, unaligned data is straightforward correctable with minor changes to the structure involved.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Tue, 19 Feb 2008 03:30:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146875#M88518</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2008-02-19T03:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146876#M88519</link>
      <description>I have written a program which exhibit the cost of accessing unaligned data, for example:&lt;BR /&gt;- On my AXP box&lt;BR /&gt;Assuming standard pointers (aligned) during iterations&lt;BR /&gt;Align for two pointers&lt;BR /&gt; ELAPSED:    0 00:00:06.40  CPU: 0:00:06.37  BUFIO: 1  DIRIO: 0  FAULTS: 1&lt;BR /&gt;Align for 4 bytes&lt;BR /&gt; ELAPSED:    0 00:00:38.68  CPU: 0:00:38.36  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 2 bytes&lt;BR /&gt; ELAPSED:    0 00:00:41.16  CPU: 0:00:38.50  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 1 bytes&lt;BR /&gt; ELAPSED:    0 00:00:38.86  CPU: 0:00:38.48  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;&lt;BR /&gt;          Normal    Align4    Align2    Align1&lt;BR /&gt;Normal    100.00     16.61     16.55     16.55&lt;BR /&gt;Align4    602.20    100.00     99.64     99.69&lt;BR /&gt;Align2    604.40    100.36    100.00    100.05&lt;BR /&gt;Align1    604.08    100.31     99.95    100.00&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Assuming unaligned pointers during iterations&lt;BR /&gt;Align for two pointers&lt;BR /&gt; ELAPSED:    0 00:00:07.57  CPU: 0:00:07.49  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 4 bytes&lt;BR /&gt; ELAPSED:    0 00:00:06.53  CPU: 0:00:06.51  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 2 bytes&lt;BR /&gt; ELAPSED:    0 00:00:06.51  CPU: 0:00:06.48  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 1 bytes&lt;BR /&gt; ELAPSED:    0 00:00:06.52  CPU: 0:00:06.49  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;&lt;BR /&gt;          Normal    Align4    Align2    Align1&lt;BR /&gt;Normal    100.00    115.05    115.59    115.41&lt;BR /&gt;Align4     86.92    100.00    100.46    100.31&lt;BR /&gt;Align2     86.52     99.54    100.00     99.85&lt;BR /&gt;Align1     86.65     99.69    100.15    100.00&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Using __unaligned&lt;BR /&gt;Normal     85.05&lt;BR /&gt;Align4    589.25&lt;BR /&gt;Align2    594.14&lt;BR /&gt;Align1    592.91&lt;BR /&gt;&lt;BR /&gt;On my IA64 box:&lt;BR /&gt;Assuming standard pointers (aligned) during iterations&lt;BR /&gt;Align for two pointers&lt;BR /&gt; ELAPSED:    0 00:00:01.87  CPU: 0:00:01.86  BUFIO: 1  DIRIO: 0  FAULTS: 1&lt;BR /&gt;Align for 4 bytes&lt;BR /&gt; ELAPSED:    0 00:04:39.97  CPU: 0:04:34.95  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 2 bytes&lt;BR /&gt; ELAPSED:    0 00:04:39.03  CPU: 0:04:34.87  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 1 bytes&lt;BR /&gt; ELAPSED:    0 00:04:42.17  CPU: 0:04:35.14  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;&lt;BR /&gt;          Normal    Align4    Align2    Align1&lt;BR /&gt;Normal    100.00      0.68      0.68      0.68&lt;BR /&gt;Align4  14782.26    100.00    100.03     99.93&lt;BR /&gt;Align2  14777.96     99.97    100.00     99.90&lt;BR /&gt;Align1  14792.47    100.07    100.10    100.00&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Assuming unaligned pointers during iterations&lt;BR /&gt;Align for two pointers&lt;BR /&gt; ELAPSED:    0 00:00:02.17  CPU: 0:00:02.15  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 4 bytes&lt;BR /&gt; ELAPSED:    0 00:00:02.58  CPU: 0:00:02.58  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 2 bytes&lt;BR /&gt; ELAPSED:    0 00:00:02.58  CPU: 0:00:02.58  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;Align for 1 bytes&lt;BR /&gt; ELAPSED:    0 00:00:02.60  CPU: 0:00:02.61  BUFIO: 1  DIRIO: 0  FAULTS: 0&lt;BR /&gt;&lt;BR /&gt;          Normal    Align4    Align2    Align1&lt;BR /&gt;Normal    100.00     83.33     83.33     82.38&lt;BR /&gt;Align4    120.00    100.00    100.00     98.85&lt;BR /&gt;Align2    120.00    100.00    100.00     98.85&lt;BR /&gt;Align1    121.40    101.16    101.16    100.00&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Using __unaligned&lt;BR /&gt;Normal     86.51&lt;BR /&gt;Align4  10656.98&lt;BR /&gt;Align2  10653.88&lt;BR /&gt;Align1  10541.76&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I can post the program if there is any interest.&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Tue, 19 Feb 2008 07:16:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146876#M88519</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-02-19T07:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146877#M88520</link>
      <description>It depends on your definition of "many".&lt;BR /&gt;&lt;BR /&gt;If many = 1000 per second then don't worry &lt;BR /&gt;about it.&lt;BR /&gt;&lt;BR /&gt;If many &amp;gt; 100,000 per second, then there will&lt;BR /&gt;probably be a big benefit fixing alignment&lt;BR /&gt;faults.&lt;BR /&gt;&lt;BR /&gt;As a rule of thumb start worrying when&lt;BR /&gt;"many" &amp;gt; 10,000 per second. Note that on Itanium, handling ailgnment faults requires&lt;BR /&gt;the MMG spinlock so there is a system wide&lt;BR /&gt;impact.&lt;BR /&gt;&lt;BR /&gt;Guy Peleg&lt;BR /&gt;BRUDEN-OSSG&lt;BR /&gt;&lt;A href="http://www.brudenossg.com" target="_blank"&gt;http://www.brudenossg.com&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Feb 2008 20:04:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146877#M88520</guid>
      <dc:creator>Guy Peleg</dc:creator>
      <dc:date>2008-02-20T20:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146878#M88521</link>
      <description>One program with &amp;gt;10,000 alignment faults per second really does slug performance for everyone on the system.&lt;BR /&gt;&lt;BR /&gt;Sadly translated code tends to be like that :-(</description>
      <pubDate>Thu, 21 Feb 2008 12:35:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146878#M88521</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2008-02-21T12:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146879#M88522</link>
      <description>Ian,&lt;BR /&gt;&lt;BR /&gt;Could you trace with FLT the source&lt;BR /&gt;of alignment faults? If it is coming from TIE&lt;BR /&gt;let me know the popular offsets and I'll see&lt;BR /&gt;what could be done about it.&lt;BR /&gt;&lt;BR /&gt;Guy Peleg&lt;BR /&gt;BRUDEN-OSSG&lt;BR /&gt;&lt;A href="http://www.brudenossg.com" target="_blank"&gt;http://www.brudenossg.com&lt;/A&gt;</description>
      <pubDate>Thu, 21 Feb 2008 13:26:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146879#M88522</guid>
      <dc:creator>Guy Peleg</dc:creator>
      <dc:date>2008-02-21T13:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146880#M88523</link>
      <description>&lt;!--!*#--&gt;- If the compiler knows the data is unaligned (and it did since it knew to issue the "MISALGNDSTRCT" message), the compiler will generate several instructions to manipulate the data in pieces.  The code SHOULD NOT generate any alignment faults.&lt;BR /&gt;&lt;BR /&gt;- Alignment faults occur when the programmer lies to the compiler.  The compiler thinks things are aligned and generates single instructions to access the data.  However, at run-time an unaligned pointer causes a fault.  The common ways involve pointers and/or parameters passed by reference.  You will NEVER see any compiler messages for these.  If we knew, we wouldn't do it.&lt;BR /&gt;&lt;BR /&gt;- I don't know what JF's example looks like to determine what it tests or doesn't test.&lt;BR /&gt;&lt;BR /&gt;- My favorite little tools for OpenVMS correspond to the "uac" tool on Tru64.  Here are the Pascal versions:&lt;BR /&gt;&lt;BR /&gt;$ type enable_align_report.pas&lt;BR /&gt;[inherit('starlet')]&lt;BR /&gt;program enable_align_report;&lt;BR /&gt;begin&lt;BR /&gt;$perm_report_align_fault;&lt;BR /&gt;end.&lt;BR /&gt;$ type disable_align_report.pas&lt;BR /&gt;[inherit('starlet')]&lt;BR /&gt;program disable_align_report;&lt;BR /&gt;begin&lt;BR /&gt;$perm_dis_align_fault_report;&lt;BR /&gt;end.&lt;BR /&gt;$ pascal enable_align_report&lt;BR /&gt;$ link enable_align_report&lt;BR /&gt;$ pascal disable_align_report&lt;BR /&gt;$ link disable_align_report&lt;BR /&gt;&lt;BR /&gt;$ run enable_align_report&lt;BR /&gt;$ run YOUR-APPLICATION&lt;BR /&gt;$ run disable_align_report&lt;BR /&gt;&lt;BR /&gt;That will cause alignment fault messages to come out to standard output.  Use your .MAP and .LIS files to track down where you lied to the compiler and stop doing it.&lt;BR /&gt;&lt;BR /&gt;- Instead of typing in lots more stuff, if you look at the release notes in the latest Pascal V6.1 release, I have a large section on the myths and facts of alignment faults including many ways to detect them, track them down and fix them.</description>
      <pubDate>Thu, 21 Feb 2008 20:21:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146880#M88523</guid>
      <dc:creator>John Reagan</dc:creator>
      <dc:date>2008-02-21T20:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146881#M88524</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;my test (stress test, generate ~400k flts/s) program just walk thru a cycle list using pointer and various alignment setting and the optional __unaligned option.&lt;BR /&gt;&lt;BR /&gt;I have attach the program so you can view how it does the various tests.&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Thu, 21 Feb 2008 21:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146881#M88524</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-02-21T21:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146882#M88525</link>
      <description>&lt;!--!*#--&gt;Yes, your example generates alignment faults and does NOT generate "MISALGNDSTRCT" messages.&lt;BR /&gt;&lt;BR /&gt;FYI: here is where the code lies to the compiler:&lt;BR /&gt;&lt;BR /&gt; p = (genlink *)(((char *)(&amp;amp;base[i])) + offset); &lt;BR /&gt;&lt;BR /&gt;My point is that the OP asked about the compiler message and everybody jumped to alignment faults.&lt;BR /&gt;&lt;BR /&gt;The message essentially means: "the compiler generated 4 or 5 instructions instead of a single instruction".&lt;BR /&gt;&lt;BR /&gt;How much does that cost?  Depends on how often you execute it.  The first memory load will probably pull all the data into the cache so the others will be faster.  The compiler will probably have to use a temp register for the shift/mask operations.  However, the memory fetch overshadows the whole mess.  So how much slower?  I'll guess 15% with a 50/50 confidence factor.</description>
      <pubDate>Fri, 22 Feb 2008 16:27:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146882#M88525</guid>
      <dc:creator>John Reagan</dc:creator>
      <dc:date>2008-02-22T16:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Does "MISALGNDSTRCT" affect CPU performance</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146883#M88526</link>
      <description>Ok but the test execute pass where it lie to the compiler and pass where it not using the "__unaligned" option.&lt;BR /&gt;In this case the cost is 15% as you have expected (last stat of the run).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2008 20:58:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/does-quot-misalgndstrct-quot-affect-cpu-performance/m-p/4146883#M88526</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-02-22T20:58:28Z</dc:date>
    </item>
  </channel>
</rss>

