From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f4671,dcf2c3d9b4549885 X-Google-Attributes: gidf4671,public X-Google-Thread: f6653,dcf2c3d9b4549885 X-Google-Attributes: gidf6653,public X-Google-Thread: 1164f8,2870e3c2c7ff13cb X-Google-Attributes: gid1164f8,public X-Google-Thread: 11035d,dcf2c3d9b4549885 X-Google-Attributes: gid11035d,public X-Google-Thread: f57db,2870e3c2c7ff13cb X-Google-Attributes: gidf57db,public X-Google-Thread: 102b75,dcf2c3d9b4549885 X-Google-Attributes: gid102b75,public From: mccalpin@frakir.engr.sgi.com (John McCalpin) Subject: Re: Latency vs performance (was Re: Sun Servers take advantage of board local memory?) Date: 1998/04/28 Message-ID: <6i4p98$mhc$1@murrow.corp.sgi.com>#1/1 X-Deja-AN: 348423648 References: <35359B3A.2A830CB1@earthlink.net> <6i3c1n$42l$1@murrow.corp.sgi.com> <3545A4C3.2F0E@uk.sun.com> Reply-To: mccalpin@engr.sgi.com Distribution: inet Organization: Silicon Graphics, Inc. Newsgroups: comp.sys.sun.hardware,comp.sys.sun.misc,comp.unix.solaris,comp.arch,comp.sys.dec,comp.benchmarks In article <3545A4C3.2F0E@uk.sun.com>, Jeremy Harris SUN Telco Platforms Group wrote: >John McCalpin wrote: >> >> ----------------------------------------------------------------------- >> >> big machine small machine >> >> vendor model latency SPECfp95 model latency SPECfp95 >> >> DEC 8400 ~400 20.8 @ 612MHz 4100 ~250 25.1 @ 612MHz (1) >> >> HP V2250 500? 24.8 @ 240MHz K580 ??? 28.5 @ 240MHz (2) >> >> Sun UE10K ~500 11.3 @ 250MHz (3) UE450 ~200 15.0 @ 250MHz >> >> ----------------------------------------------------------------------- >> >> SGI Origin 290 24.5 @ 250MHz Origin 290 24.5 @ 250MHz >> >> ----------------------------------------------------------------------- > > John, could you expand the "big machine latency" column to show > the difference between process working set small enough to live > on one node and large enough to require distribution over several > nodes? I am not sure that my ASCII artwork is up to the task (since this rapidly becomes multi-dimensional), but I can describe the behavior, anyway.... On the SGI Origin2000 (or other ccNUMA machines), a trade-off is made between local and remote accesses. Local accesses can be made significantly faster, but as a consequence, remote accesses become somewhat more complicated (at the hardware level), and therefore slower. On the 250 MHz Origin2000, the formula for latency is 290 ns for local access, plus 160 ns for leaving the node, plus 100 ns for each router traversed (50 ns for the outgoing request plus 50 ns for the incoming data). The Origin2000 is built using a "bristled hypercube" topology, which minimizes the number of router traversals required. For example, the 16-cpu machine discussed has a maximum of 3 router traversals for the worst case. We also offer the option of "express links" using one of the extra router ports to reduce the worst case to 2 router traversals. But just to keep the discussion general, I will look at the standard case. The 16-cpu Origin2000 has 4 routers arranged in a square, and each router has 2 nodes attached to it. Each "node" has some memory and 2 cpus. The quantity of memory at each "distance" is: local 1 node 1 router 1 node 2 routers 4 nodes 3 routers 2 nodes So for data that is completely uniformly distributed, the average latency is: 1/8*( 1*(290) +1*(290+160+100) +4*(290+160+200) +2*(290+160+300) ) ---------------- (290 + 550 + 4*650 + 2*750)/8 = 4940/8 = 618 ns. So there is some penalty (relative to a "flat" SMP system) if you pay no attention to locality at all, and just get random placement of the data. Note that this is a small penalty relative to the "big" Sun UE10000 (at ~500 ns), but a large penalty relative to the "mid-sized" Sun UE6000 (at ~250 ns). There are a variety of operating system mechanisms in place to give you better locality than this (for example, each job gets pages locally first, and if those run out, it gets pages from near nodes before distant ones), however if you are using all the memory in the machine for a single process, the average latency will be as shown above. For unit-stride accesses, the bandwidth to/from remote memory is closer to being uniform than the latency. For example, a "bcopy()" operation with one local reference and one remote reference (3 routers away) runs at about 88% of the performance of the case with both local references. The absolute rate for bcopy therefore varies between 146 MB/s for all local accesses down to 130 MB/s for "one-operand-three-hops-away" to about 105 MB/s for "both-operands-three-hops-away". This can be compared to 82 MB/s for the "flat" Sun Ultra 10000 server, and 140 MB/s for the smaller "flat" Sun Ultra 6001 server. (Here I am using the "bcopy()" convention for counting bytes -- to get STREAM Copy numbers, double these figures). The cases with contention are more complicated, and I will save that discussion for another time.... To summarize, ccNUMA machines optimize for local memory performance at a slight penalty for global random-access latency, but not necessarily for remote access bandwidth. The benefit is superior local memory latency and bandwidth, and decreased cost (i.e., no need to buy a big crossbar/switch/bus). -- -- John D. McCalpin, Ph.D. Server System Architect Server Platform Engineering http://reality.sgi.com/mccalpin/ Silicon Graphics, Inc. mccalpin@sgi.com 650-933-7407