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: 1164f8,2870e3c2c7ff13cb X-Google-Attributes: gid1164f8,public X-Google-Thread: f57db,2870e3c2c7ff13cb X-Google-Attributes: gidf57db,public X-Google-Thread: 102b75,dcf2c3d9b4549885 X-Google-Attributes: gid102b75,public X-Google-Thread: 11035d,dcf2c3d9b4549885 X-Google-Attributes: gid11035d,public X-Google-Thread: f6653,dcf2c3d9b4549885 X-Google-Attributes: gidf6653,public From: ASHOK SINGHAL Subject: Re: Latency vs performance (was Re: Sun Servers take advantage of board local memory?) Date: 1998/05/12 Message-ID: <35589F27.9528B4A7@Eng.Sun.Com>#1/1 X-Deja-AN: 352843857 Content-Transfer-Encoding: 7bit References: <35359B3A.2A830CB1@earthlink.net> <3548EC1B.41C6@radia1.com> <6iarfr$iq6$1@murrow.corp.sgi.com> <354A0344.B38B650C@Eng.Sun.Com> <6iv4qk$6a0$1@murrow.corp.sgi.com> Mime-Version: 1.0 Distribution: inet Content-Type: text/plain; charset=us-ascii Organization: Sun Microsystems Newsgroups: comp.sys.sun.hardware,comp.sys.sun.misc,comp.unix.solaris,comp.arch,comp.sys.dec,comp.benchmarks 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". If you bundle the whole category of database applications into a single "app" then maybe you are right. Of course, that ignores the fact that a large number of machines run many instances of precisely those. Even assuming you're only talking about single-threaded apps in a timesharing enviroment, what you say below is false. > of one application per cpu. In that case, if "most" apps used > more memory than was available locally, the physical memory of > the machine would be oversubscribed, and the machine would thrash > horribly. This is painful enough that most people manage to make > it not happen, either by serializing the execution of the > large-memory jobs, or by buying more RAM. Simple arithmetic in an example shows why this is false. Suppose there are 16 processors and each processor has local memory of 64 MB (for a total of 1024 MB). Suppose there are 15 apps that use 68 MB of memory and 1 app that uses 3 MB of memory. Clearly, in this example "most" apps (15 out of 16), don't fit in local memory, and yet the total memory used is less than the available memory ((15 * 68) + 3 = 1023). Not only is it false, but it is also it is also a naive view of servers used for running general apps and timesharing. 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. So either you replicate these (which uses more memory and results in quicker onset of paging/swapping) or you have applications making remote accesses. Either way you get a performance penalty. 2. On Solaris (and probably in Irix as well??) memory caches parts of the file system. Therefore, unless an application runs on exactly the same node that has the cache for all the files it touches (which the OS can't know until the application runs), it will make remote access. 3. Non-local memory may result, even if there is plenty of memory, as a result of load balancing. Consider an example: A large, memory-intensive simulation is blocked waiting for some user interaction. Another process starts on the CPU (other CPUs happen to be busy at this time with a short burst of activity) and allocates a bunch of memory locally (there's plenty of memory so this is not a problem). The other CPUs then free up. Finally, the simulation job gets unblocked but the other process is now running and has a bunch of local memory allocated. You'd need to migrate one of those two proceses over to a remote CPU. This is not an unusual case. Often, even on a system with a light average load, there are bursts of high load for small periods of time, and typically there are lots more processes than there are procesors, most of which are blocked waiting for some IO or event. Implementing very strong processor affinity in an attempt to get good memory locality can have a negative impact on effectiveness of load balancing. 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. Perhaps this is typical of some general timesharing systems, but if it is, I haven't seen any examples. - Ashok Singhal Sun Microsystems