Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2000 15:01:36 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        freebsd-current@FreeBSD.ORG
Subject:   SMP buildworld times / performance tests
Message-ID:  <200003292301.PAA65915@apollo.backplane.com>

next in thread | raw e-mail | index | archive | help
time make -j 20 buildworld	build FreeBSD-current using 4.0 kernel

    4745.607u 1673.646s 1:29:07.45 120.0%   1323+1599k 8237+251565io 1615pf+0w

time make -j 20 buildworld	build FreeBSD-current using 5.0 kernel

    4696.987u 1502.278s 1:10:34.17 146.4%   1359+1641k 10889+4270io 1779pf+0w

Difference:  19 minutes, or a 21% improvement.  Bob Bishop got 7% with an 
earlier patch (hopefully his system is no longer locking up and he can
repeat his test with the current stuff).

It would be interesting to see what other people get.  I suspect my numbers
may not be entirely accurate (I'll have to run the build a couple of times).
Of course, this includes whatever other changes have gone into 5.x that
haven't gone into 4.x, but I'm pretty sure the SMP patches are the major
benefit to the timings.

I also did some syscall timing tests between 4.0 and 5.0.  Using getpid(),
which is *NOT* MP-safe in 5.0 (getuid() is but for obviously reasons would
not be a fair test).

Under FreeBSD-4:

	test4:/test3/smp# ./smptime 1
	3343 nsec/call
	1666 nsec/call
	1647 nsec/call
	1646 nsec/call
	1646 nsec/call
	1647 nsec/call
	1657 nsec/call
	1646 nsec/call
	1647 nsec/call
	1646 nsec/call
	^C
	test4:/test3/smp# ./smptime 2
	6922 nsec/call
	5122 nsec/call
	5162 nsec/call
	5101 nsec/call


Under FreeBSD-5:

	test3:/test/smp# ./smptime 1
	2727 nsec/call
	1360 nsec/call
	1359 nsec/call
	1359 nsec/call
	1359 nsec/call
	1359 nsec/call
	^C
	test3:/test/smp# ./smptime 2
	3620 nsec/call
	2252 nsec/call
	2253 nsec/call
	2251 nsec/call
	2251 nsec/call
	^C

    Now, I consider that significant.  Even though getpid() is NOT MP safe
    under FreeBSD-5, the SMP patch has improved its syscall overhead in a
    competing-cpu's case (two forks running concurrently) by an immense
    degree over FreeBSD-4.  5.1uS in FreeBSD-4 went down to 2.2uS in 
    FreeBSD-5.

    That's a big deal, folks!  It's quite a bit more then I thought we would
    get.

    For the single-process (1-fork) case, syscall overhead improved 
    moderately from 1.6 uS in 4.0 to 1.3 uS in 5.0.  I think the marked
    improvement in the competing-cpu's case is due to the movement of the
    MP lock inward somewhat (even for syscalls that aren't MP safe),
    the removal of a considerable number of unnecessary 'lock'ed instructions,
    and the removal of the cpl lock (which benefits spl*() code as well as
    syscall/interrupt code).

    I got similar results for calling sigprocmask():

Under FreeBSD-4:

	test4:/test3/smp# ./smptime 1
	5455 nsec/call
	2742 nsec/call
	2741 nsec/call
	2741 nsec/call
	2741 nsec/call
	2741 nsec/call
	2741 nsec/call
	2741 nsec/call
	2741 nsec/call
	2740 nsec/call
	2740 nsec/call
	2741 nsec/call
	^C
	test4:/test3/smp# ./smptime 2
	10011 nsec/call
	7291 nsec/call
	7289 nsec/call
	7289 nsec/call
	7289 nsec/call
	7294 nsec/call
	^C

Under FreeBSD-5:

	test3:/test/smp# ./smptime 1
	4083 nsec/call
	2044 nsec/call
	2041 nsec/call
	2041 nsec/call
	2041 nsec/call
	2041 nsec/call
	2041 nsec/call
	2041 nsec/call
	2041 nsec/call
	2041 nsec/call
	2041 nsec/call
	^C
	test3:/test/smp# ./smptime 2
	6514 nsec/call
	4459 nsec/call
	4466 nsec/call
	4474 nsec/call
	4484 nsec/call
	4476 nsec/call
	4475 nsec/call
	^C

    2.7 uS -> 2.0 uS	non-competing
    7.3 uS -> 4.5 uS	competing

    Very significant.

						-Matt




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003292301.PAA65915>