Closed
Bug 87725
Opened 23 years ago
Closed 23 years ago
Instrument NSS use of PLArena
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
3.4
People
(Reporter: larryh, Assigned: larryh)
Details
Attachments
(3 files)
4.27 KB,
patch
|
Details | Diff | Splinter Review | |
3.92 KB,
text/plain
|
Details | |
4.27 KB,
text/plain
|
Details |
NSS uses PLArena in a number of places as a substitute for malloc(). PLArena uses malloc() subdividing the malloc'd pieces to its caller. By subdividing a malloc'd piece, performance pressure on malloc is reduced. There is speculation that the CHUNKSIZEes for the arena pools are not optimal and that the malloc() overhead may be high in spite of NSS's intent. This bugzilla documents a temporary instrumentation to capture data to support or refute the above assertion. The instrumentation will capture the "high water mark" for the arena pool. That is: the total size of all allocation taken from an arena pool. The instrumentation code will not be checked in to the tree. The patch will be attached to this report in case it is needed again. No attempt will be made to account for the effects of calls to mark and release, other than to note that they occured. If analysis of the instrumentation data show heavy use of mark and release, this issue will be revisited. The test harness selfserv and strsclnt will be used to gather data. After NSS are satisfied that it works, iWS will be asked to use the instrumented parts and provide us with the captured data. If the instrumentation shows that NSS can improve its performance with PLArena, then adjustments to NSS will be made on a separate ticket.
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•23 years ago
|
||
Alas, the use of mark & release in NSS arenas cannot be ignored. In the inital instrumentation, I emitted a message for each use of mark & release. There's a lot of use for this. Therefore, the original goal of just keeping a high water mark (HWM) within the PORTArena structure is not adaquate. Some post processing of the log data is required to get the true high water mark. Write a little perl, keep score of the HWM for each distinct PORTArena structure by correlating a release with the HWM at the time of the mark.
Assignee | ||
Comment 2•23 years ago
|
||
add cc Bob Relyea, Julien Pierre
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
Assignee | ||
Comment 6•23 years ago
|
||
I ran the test programs selfserv, with instrumented secport.c, and strsclnt with the following strsclnt commands: strsclnt -c 1000 strsclnt -c 1000 -N (2000 transactions) This yielded a log file containing 110142 lines, where each line represented some use of the PLArena functions in secport.c I fed the logfile to the perl script. The summary section of the perl script reported: 0 greater than 8k 0 greater than 6k 6 greater than 4k 6 greater than 2k 13223 less than 2k A little hand analysis says that for each transaction, 6 arenapools were used. Each transaction called an arena function 55 times. The data on arenapool size says that for almost all transactions, the arenapool use was limited to a single arena. I conclude that there is no merit to trying to optimize the default arenapool size to limit the number of calls to malloc(); it is already close to optimal. Finally, wtc suggests that I hand-build a solaris NSS with the instrumented secport.c for use by iWS in their performance testing. We (NSS group, really: me) will run the perl script against the logfile generated to see how iWS use of NSS fares. ... Julien, gimme a call, please. Tell me which version (3.2.1, 3.3) of NSS you want to test with.
Updated•23 years ago
|
Priority: -- → P1
Target Milestone: --- → 3.4
Assignee | ||
Comment 7•23 years ago
|
||
Julien ran iWS using the instrumented NSS 3.3 using 200 transactions; 100 generating new keys; 100 using cached keys. The follwing are the data, after reducing the log file. 4 greater than 8k 28 greater than 6k 249 greater than 4k 152 greater than 2k 7387 less than 2k It shows some higher use of arenas greater than 2k, but it still does not appear that increasing the default arenasize in NSS would buy much performance.
Comment 8•23 years ago
|
||
This was completed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•