Waldek
Thanks for the further clarification.
> Date: 2 Jul 2003 13:42:10 GMT
> Organization: Politechnika Wroclawska
>
> Aaron Sloman (A.Sloman@cs.bham.ac.uk) wrote:
>
> : I've now tried this on the Sun/solaris version of poplog also:
> : solaris version 8 running on a 4cpu 450 mhz ultrasparc.
> : The old version took about 5% longer than the new version.
> : It's a multi-user machine, but the load was very light at the time.
> : However, on an old Dell laptop, running redhat 9 on a 400 mhz
> : celeron CPU, there was barely any difference in speed.
> : (This may be partly due to the slow laptop disk drive causing
> : other differences to be masked. The machine on which the time
> : difference was most marked (1ghz athlon) also had the fastest
> : disk.)
>
> Unless you benchmarked disk IO (and many tests intended to measure
> disk IO actually measure DRAM speed) the most probable explanation
> is that DRAM latency in laptop in only slightly bigger then latency
> in modern machine, so laptop does not feel so much slowdown from
> chache mises. Also, there are instruction that are fast on Celeron
> but slow on Athlon (and vice versa).
I thought I would check and make sure that I had used the same
(newly compiled) version of the poplog compiler on sources that
differed only in the way they handled errno. So I carefully
recompiled the old sources and rebuilt saved images and then did the
tests again on AMD athlon 1ghz.
Old version (average of several runs): 5.336 seconds
New version (average of several runs): 4.722 seconds
Ratio: 5.336/4.722 = 1.13003
I.e. 13% difference.
I then increased the number of iterations in the program to
make it run for longer, to reduce effect of start-up time
and got this
Ratio: 27.82/24.385 = 1.14087
I.e. 14% difference.
I then did another test (involving computing factorial 5000 several
times) and found when I had accidentally done some of them with a
large value for popmemlim and the other with a much smaller value,
that there was a big time difference and also a big difference in
the number of garbage collections.
This reminded me that the poplog store manager automatically varies
heap size (as explained in REF system). The decision to increase
or decrease it depends on whether the ratio of garbage collection
time to total cpu time is above some threshold. Those times can
vary randomly and it may be that a small initial difference causes
the heap to be increased in the new system and not in the old one.
That could make both the prolog and the factorial benchmarks run
significantly faster in the new system, as both turn over a lot of
memory. When I have more time I'll experiment with setting
popminmemlim at some large starting value in both systems, to see if
that removes the timing difference.
> : I asked a colleague about the speed difference and he offerered the
> : suggestion that inline access to a variable might be compiled in a
> : location-independent fashion which would make access slow compared
> : with a call to a procedure at an absolute address.
>
> I checked output of `popc -a'. The acces to `errno' is definitely
> a single machine istruction. When I wrote that the effect is "random"
> I mean that small change in sources can produce speed up/slow down
> in unrelated parts of the program. Once the program is compiled and
> linked the effect is pretty reproducible.
Yes: I apologise for the misunderstanding. After I had posted my
message I re-read yours and realised that I had previously
misinterpreted it.
> I do not belive that accessing errno is time-critical, after all
> it is overhead on system calls (and few C library calls). System
> calls always were expensive (so are not frequent) and I do not think
> that Poplog is wasting 10% of execution time looking at `errno'
> without any need.
However a very small change in speeds could be greatly amplified if
it causes the heap size to be increased, reducing the number of
garbage collections.
Maybe that's the only thing that has been happening!
If so, the mystery is solved.
Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html
|