>Number: 1660
>Category: os-irix
>Synopsis: accept(2) serialization patch using MIPS ABI; two orders of
>magnitude faster than System V semaphores.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: change-request
>Submitter-Id: apache
>Arrival-Date: Mon Jan 12 22:10:01 PST 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3b3
>Environment:
IRIX nicar 6.2 03131015 IP22, IRIX orbital 6.3 12161207 IP32,
probably everything from IRIX 5.3 on up.
>Description:
USE_SYSVSEM_SERIALIZED_ACCEPT is too slow. Other options are available
that provide better performance; one of them is the abilock(3) family
of calls that the MIPS ABI supports. Tests here indicate that MIPS ABI
mutexes are two orders of magnitude faster than System V semaphores and
involve minimal kernel overhead.
>How-To-Repeat:
I created two test harnesses that do the following:
initialize lock;
repeat 500000 times {
acquire lock;
release lock;
}
and tested one with the SYSVSEM_SERIALIZED_ACCEPT code and the other with
the MIPS_ABILOCK_SERIALIZED_ACCEPT code (referenced in the 'suggested fix'
section').
The following is from the System V semaphore code:
nicar /hosts/nicar/usr/people/shag/proj/apache > time ./a.out
4.887u 18.781s 0:24.55 96.3% 0+0k 0+0io 0pf+0w
nicar /hosts/nicar/usr/people/shag/proj/apache > time ./a.out
3.789u 17.719s 0:23.69 90.7% 0+0k 0+0io 0pf+0w
nicar /hosts/nicar/usr/people/shag/proj/apache > time ./a.out
3.878u 17.755s 0:25.42 85.0% 0+0k 0+0io 0pf+0w
The following is from the MIPS ABI ABILOCK code:
nicar /hosts/nicar/usr/people/shag/proj/apache > time ./a.out
0.120u 0.014s 0:00.27 48.1% 0+0k 4+0io 0pf+0w
nicar /hosts/nicar/usr/people/shag/proj/apache > time ./a.out
0.120u 0.011s 0:00.09 144.4% 0+0k 0+0io 0pf+0w
nicar /hosts/nicar/usr/people/shag/proj/apache > time ./a.out
0.120u 0.011s 0:00.00 0.0% 0+0k 0+0io 0pf+0w
>Fix:
Download the patches
<URL:http://www.nicar.org/~shag/mips_abilock_1.patch>
and
<URL:http://www.nicar.org/~shag/mips_abilock_2.patch>
and integrate them into the Apache source tree.
Multiprocessor systems -- especially NUMA ones like the Origin series -- may
experience less of a performance gain if false sharing occurs on the lock,
but the speed gain should still be notable over the System V code.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]