Bad frame arena size causes allocations of blocks of ~4108 bytes.

RESOLVED INCOMPLETE

Status

()

P3
normal
RESOLVED INCOMPLETE
18 years ago
7 months ago

People

(Reporter: bratell, Assigned: dbaron)

Tracking

({perf})

Trunk
Future
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
The frame arenas are specified of being of size 4096, but there are some 
overhead in the PL_Arena so the allocations are of ~4108 bytes. That is sub 
optimal with many memory allocators.

I lowered it to 4050 bytes and got a minor speed increase (too noisy to give 
any distinct figures, but it was faster by 3-30%). I guess there is less 
chance of fragmentation in the heap too.
(Reporter)

Comment 1

18 years ago
I tested the table stress case which has 40000 frames and calls 
FrameArena::AllocateFrame 143142 times.

With the current default size I got 145 to 170 ms with most numbers being 
between 145 and 150 ms.

With a slightly lower default size I got 125-145 ms with most numbers being 
between 135 and 145 ms.

I got no real difference in memory usage but VM Size seemed to increase 
somewhat when I lowered the allocation size. (When I tried a default allocation 
size of 8160 it decreased slightly - strange)
> too noisy to give any distinct figures

You have a bunch of numbers, right?  Just quoting the means and standard
deviations may be helpful to see what sort of speedup we're looking at.

(Reporter)

Comment 3

18 years ago
4196:
930 ms (hard swapping I guess)
168 ms
153 ms
145 ms
145 ms
143 ms

4150-4170:
221 ms
145 ms
140 ms
138 ms
135 ms
124 ms

8160:
92 ms
Keywords: perf
Moving over to my list... unless you want to own this, Daniel?
Assignee: karnaze → dbaron
Priority: -- → P1
Target Milestone: --- → mozilla0.9.3
(Reporter)

Comment 5

18 years ago
You take it. You have probably better overview of the consequences of changing 
the value.
Ok, then next milestone since I don't have time to fiddle with it to figure out
the best size.
Target Milestone: mozilla0.9.3 → mozilla0.9.4
(Reporter)

Comment 7

18 years ago
I made a program that measured the time to allocate different block sizes and as
far as I could tell the time was linear to the block size, so on Windows it
might not make any difference for performance after all. Curiously, freeing
memory was many times slower than allocating memory.
QA Contact: chrispetersen → layout
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
Priority: P1 → P3
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.