On 11.11.2010 00:39, Levente Uzonyi wrote: > On Thu, 11 Nov 2010, Levente Uzonyi wrote: > >> On Tue, 9 Nov 2010, Philippe Marschall wrote: >> >>> On 09.11.2010 07:58, Schwab,Wilhelm K wrote: >>>> What does your patch do? >>> >>> It replaces the #& with and #and: swaps receiver and argument to >>> preserve the same semantics. That saves a primitive call if the data is >>> already sent. It's basically the same as posted by Levente. >>> >>>> At a minimum, it deserves a little attention. Things that come to >>>> mind are that one version does less work due to some type of >>>> optimization (and runs faster as a result) or that one is too quick >>>> to detect a loss of connection and sends less data per opportunity, >>>> appearing to run slower as a result. >>>> >>>> Can you elaborate on "I'm able to push about 1 Mbyte/s more"? I >>>> guess I'm asking how that manifests itself? Are there a bunch of >>>> connections that form, send and fail? Do they each get a little >>>> farther or do they go faster? >>> >>> Throughput outgoing from the Pharo image was about 1 Mbyte/s higher. Now >> >> 1MB/s throughput sounds pretty low. On windows I could transfer >> 160MB/s using two processes in the same image by directly using the >> Socket primitives in 4k chunks. With high level methods (#sendData: >> #receiveData:) it went down to 110MB/s. With a two image setup >> (client-server) I got 66MB/s (one CPU/image). > > Looks like I missed the word "higher" in your mail. Anyway, I'm > interested in your absolute numbers too.
See the attachment. Note that this benchmark is a lie, you're unlikely to see this performance in actual production code. It's a simple Seaside request handler that just writes a 16 Kbyte byte array to the response. In fact it's the source of www.seaside.st. No rendering, no encoding, no sessions, no backtracking, no continuations. You can find the code AJP-Tests-Core in the ajp project on SqueakSource. This is done on an old Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz, 64bit Linux 2.6.35, Cog r2316 and Pharo 1.1.1. Cheers Philippe
ab2 -k -c 10 -n 100000 http://localhost:80/fast This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 10000 requests Completed 20000 requests Completed 30000 requests Completed 40000 requests Completed 50000 requests Completed 60000 requests Completed 70000 requests Completed 80000 requests Completed 90000 requests Completed 100000 requests Finished 100000 requests Server Software: Server Hostname: localhost Server Port: 80 Document Path: /fast Document Length: 16294 bytes Concurrency Level: 10 Time taken for tests: 35.894 seconds Complete requests: 100000 Failed requests: 0 Write errors: 0 Keep-Alive requests: 99014 Total transferred: 1648855638 bytes HTML transferred: 1629400000 bytes Requests per second: 2785.96 [#/sec] (mean) Time per request: 3.589 [ms] (mean) Time per request: 0.359 [ms] (mean, across all concurrent requests) Transfer rate: 44859.86 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 0 4 1.5 3 43 Waiting: 0 4 1.5 3 43 Total: 0 4 1.5 3 43 Percentage of the requests served within a certain time (ms) 50% 3 66% 4 75% 4 80% 4 90% 5 95% 6 98% 7 99% 9 100% 43 (longest request)
