From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f6fab0461e859669,start X-Google-Attributes: gidfee84,public From: heiby_u@falkor.chi.il.us (Ron Heiby) Subject: 3.2G to 4.0D Benchmark Comparison Date: 1998/06/18 Message-ID: <3589219f.4921490@149.174.211.108> X-Deja-AN: 363917597 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Strategis Consulting Inc. MIME-Version: 1.0 Newsgroups: comp.unix.osf.osf1 -----BEGIN PGP SIGNED MESSAGE----- Hi! While my firm was running Digital UNIX 3.2G, I ran several benchmark programs to attempt to determine a number of transactions per second that might be made through my system, and (more important) the relative speed of performing certain operations in different ways. The basic test is to have a client program and a server program that pass blocks of data back and forth to each other. In each case, the server establishes a socket connection on which to listen and the client establishes N connections to the server. Each connection has its own socket. The client picks a connection at random and sends 1000 bytes on it. The server receives these 1000 bytes and sends them back on the same socket on which they were received. When the client receives the 1000 bytes back from the server, it repeats the process. Every second, the client displays statistical information, basically the number of transactions (round trips) it was able to accomplish in the last second, plus total and moving averages. There are different versions of the server. One version uses a single process and a single thread in that process, handling all N socket connections using select(2). Another creates a thread for each socket, and each thread does a blocking read on its socket, waiting for something to do. Another version of that threaded server (and modified client) use AF_LOCAL (AF_UNIX) sockets, instead of AF_INET sockets. In each test, both client and server are on the same machine. Each test is run for at least ten minutes with each of various numbers of socket connections (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2000). (Why 2000, rather than 2048, you ask? Well, the thread approach runs out of system memory on my 128 Meg machine before I reach 2048 under 3.2G. Under 4.0D, I run out of memory a bit sooner.) The tests are run when the system is otherwise (basically) idle. The tests are run for at least ten minutes, with the average throughput for the entire run used in reporting the results. During each test, the system has zero idle time. The system is a 133 MHz Alpha with 128 Meg of RAM. I have attempted to have minimal tunable parameter changes from whatever the defaults were on the two versions, and have attempted to have the same changes made on both versions. The tunable changes are: sem-mni=32; msg-mni=1024; max-proc-per-user=8000; maxusers=1024; sominconn=1024; name-cache-hash-size=1024; vm-mapentries=16384; vm-ubcseqpercent=20; and vm-vpagemax=65536. I had not expected the select(2) version use so much system cpu time at higher numbers of sockets, but (thinking about it) it does seem reasonable. I was surprised that in moving from 3.2G to 4.0D, the select(2) version showed an improvement in performance. At the 1024 socket level, we went from 83 to 131 transactions per second (TPS). In fact, in the new version, the select(2) approach has better TPS numbers than the thread approach until a crossover at approximately 32 sockets, above which the thread approach is still superior. In the 3.2G tests, there was no crossover, with select(2) always being inferior to the thread approach, by increasingly large margins as the number of sockets increased. The thread approach shows a marked reduction in throughput under 4.0D vs. the levels were were seeing under 3.2G. At the 1024 socket level, we went from 1191 to 640 TPS. Using AF_LOCAL sockets, the performance went from 2446 to 857 TPS. We are quite surprised and disappointed by the dramatic reduction in performance we are seeing with 4.0D vs. 3.2G. We are curious as to what the cause is, and whether there are any tunable parameter changes that might be of help in restoring the previous (higher) performance levels. If the answer is that the 3.2G implementation of threads and/or sockets was very buggy and that 4.0D does it properly (though at a price), I can understand that. As my C.S. professor (Dershem) told me many years ago, "Any fool can write a fast sort program, if it doesn't have to put them in the right order." So, I'd rather have correct than fast. If it's something else, I'd like to know that, too, particularly if there is a known problem with a fix available or soon to be available. Thank you very much! -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.5.3 Comment: My Keys: 0x571B55BD and 0x628ECED, available from keyservers iQEVAwUBNYk20+ukCaFXG1W9AQEB9wf/UCXxAW/VtLymCXEtHK3uBmbSGggF5rbA 0S7RaKl3Wfr9CGiRwagp6aKz6oH2vB9nIs/tSCYkDNLy08eFZj9J7W3Zi6MjBm0A Ie6Vzat12obRUDUqnAKo47qzBKsvt69l//2dNqsjwRl5BxPphK86SbOf4rYuSv+I TN/dcc2CauogD8g8XSKYa9XES7+xII2iRRKi3mEDqxjEj3XR0EYKYteM29Kv2kej mYG7OTnbEg18EQmpTBxEVYuW+1qHn/3q63fq9npVe8zedaYXven6oe1/vchy5GKC ZkaxppnEFbvcp8IHDkDKFuOqubRWYUVFDeHaF0M3sLH2V+sSXg6KNw== =vWOv -----END PGP SIGNATURE----- -- Ron.