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: f57db,2870e3c2c7ff13cb X-Google-Attributes: gidf57db,public X-Google-Thread: 11035d,dcf2c3d9b4549885 X-Google-Attributes: gid11035d,public X-Google-Thread: 102b75,dcf2c3d9b4549885 X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,2870e3c2c7ff13cb X-Google-Attributes: gid1164f8,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/05/13 Message-ID: <6jcemg$cpo$1@murrow.corp.sgi.com> X-Deja-AN: 352900559 References: <35359B3A.2A830CB1@earthlink.net> <354A0344.B38B650C@Eng.Sun.Com> <6iv4qk$6a0$1@murrow.corp.sgi.com> <35589F27.9528B4A7@Eng.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 <35589F27.9528B4A7@Eng.Sun.Com>, ASHOK SINGHAL wrote: >John McCalpin wrote: >> >> However, it seems to me that "most" individual apps will fit in >> local memory, especially if the machine is running on the order > >Depends on how you count "most". Maybe I am "estimating" instead of counting? My 6-year-old tells me that "estimating" is the same as "guessing", which is closely related to "arguing by anecdotal evidence", which is what both Ashok and I are doing here. It is important to remember a couple of things when thinking about the "performance penalties" of off-node memory references in a ccNUMA machine like the Origin: (1) Many apps are not significantly memory-access-limited, so an increase in latency from ~300ns to ~600-700ns for a fraction of the cache misses will have a performance impact that is significantly smaller than the increase in average latency. Given that we are comparing machines with different cpus, different O/S's, different compilers, different prices, and (often) different platform-optimized source code, the effect of a small latency increase will be way down in the noise for these apps. Of course, this includes both the latency increase for off-node accesses in a ccNUMA machine (like the SGI Origin2000) as well as the increase in latency for building a large, monolithic shared-memory machine like the Ultra10000 or the DEC 8400. (2) Many of the apps that are significantly memory-access-limited are bandwidth-limited, rather than latency-limited. In this case, you need to look at the sustainable bandwidth numbers, not the latency numbers. They are related, but not in an easy way. For example, the Sun Ultra6000 runs STREAM Copy a bit slower than the Origin2000 for local accesses, but faster than the Origin if one or both of the arguments to STREAM Copy are non-local. On the other hand, the extra latency of the Sun Ultra10000 decreases the sustainable bandwidth for STREAM Copy so that the Origin2000 is faster even if both the source and destination memory blocks are on the most distant node of the machine. This is the contention-free result. Results under heavy contention will certainly vary, but it is not possible to make blanket statements, except that the Sun Ultra 10000 will generally scale very well under heavy contention, while the Origin2000 scaling will be somewhat more dependent on the details of the access patterns. This is "simple physics" associated with the slightly lower-bandwidth links on the Origin2000 relative to the Sun Ultra10000 nodes, and the fact that the Origin2000 interconnect fabric is a bristled hypercube instead of a fully connected multi-stage switch. (3) The remaining apps that are memory-access-limited and latency- limited fall into several more sub-categories, depending on the size of the working set and the distribution of accesses across that working set. Those with either small working sets or with concentration of accesses in a relatively small region can work fine on a ccNUMA machine (especially with the node memories configured to some large value, like 4 GB). On the other hand, those with very large working sets and uniformly distributed references will show performance characteristics more closely approximating the hypothetical average latency function. I am not arguing that this last set is unimportant, since it does include things like TPC-C and some important codes run by the intelligence community, but I am saying that it is necessary to understand the memory access characteristics of your own applications in order to understand how well it is likely to work on a given memory architecture. No vendor has produced a machine that is uniformly superior to all other vendors' machines for all application areas -- the economics of the technologies and the requirement for engineering trade-offs do not allow that to happen. > 1. You can have situations where the sum of all the application > memory is greater than the total memory available, but memory is > still not oversubscribed. That's because even applications > implicitly share memory even if they are completely > single-threaded. An example of this is shared libraries, and its > very likely that libraries such as libc, libX11 etc are shared > extensively. Text accesses to shared libraries are almost never in the critical path for performance. Access times are much more strongly determined by how clever the loader is at getting shared-library accesses started early and by the efficiency of the file system at loading the data than by the latency of getting the individual cache lines from the buffer to which the file system loads the library. > 3. Non-local memory may result, even if there is plenty of > memory, as a result of load balancing. Yes, this is a "feature", not a "bug". The scheduler will keep track of the "home" node for a job, and run it there as often as possible. When that node becomes congested, it will run the process on a nearby node, rather than allowing the congestion to build up (which is what happens on a cluster, since process migration is very expensive, and generally not available there). It is correct that this is more complex than on a flat SMP machine, and can result in some performance degradation relative to a hypothetical machine with a flat, low latency. However, that hypothetical machine with flat, low latency does not actually exist, so the right thing to do is workload evaluation of the real machines to see how well the balances of cpu performance and the hierarchies of memory latency and bandwidth work at each price point for the workload that the customer needs to run. >Specrate runs N copies of a benchmark, waits for all copies to complete, >runs N copies of another benchmark, etc. Typically N is the same as >the number of CPUs, there are no other significant runnable jobs >and there is consequently no load-balancing at all. There is also >no memory pressure and the applications block very little. SPECrate certainly has limitations as a "workload" benchmark. It does have one redeeming property, and that is that it shows clearly the reduction in performance due to contention for a shared memory bandwidth resource by multiple, independent jobs. This is a real effect, and one that users ought to be aware of. Given the fact that the SPECrate infrastructure already exists, it is probably a good idea to keep it for SPEC98. On the other hand, there is no reason to limit our thinking about "throughput" or "workload" benchmarks to the form taken by SPECrate. I believe that both computer vendors and customers would be well- served by the development of a more realistic throughput benchmark based on the individual SPEC codes. This would likely include both compiling and running the codes, but would have ordering and synchronization properties that would be mostly chaotic (like real systems), rather than lock-step like the current SPECrate benchmark. -- -- 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