Closed Bug 996836 Opened 10 years ago Closed 8 years ago

HTTP cache v2: Consider merging WRITE, CLOSE, EVICT IO thread levels to only a single one

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: mayhemer, Assigned: mayhemer)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I am not sure why I originally have split WRITE and CLOSE.  If we have a lot of writes scheduled, this may block closing the files and our handles for a long time.  And waste resources (sys handles/buffers).

Then, to make the time we overgrow the cache disk consumption over the limit as short as possible, we should not delay evicting by lowering its priority to the absolute bottom but rather beside the writes.  Also may lower out-of-disk-space error rate on small partitions.

I suggest instead of

    OPEN_PRIORITY,
    READ_PRIORITY,
    OPEN,
    READ,
    MANAGEMENT,
    WRITE,
    CLOSE,
    INDEX,
    EVICT,

the following list:

    OPEN_PRIORITY,
    READ_PRIORITY,
    OPEN,
    READ,
    MANAGEMENT,
    WRITE,
    INDEX,

and post CLOSE and EVICT on WRITE.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attached patch v1Splinter Review
Let's leave the CLOSE distinction for now.  We can cleanup later when this proves itself.

Will push to try later.
Attachment #8704296 - Flags: review?(michal.novotny)
Note: leaving the EVICT level for now.  I don't think we should remove/merge it.
Comment on attachment 8704296 [details] [diff] [review]
v1

Review of attachment 8704296 [details] [diff] [review]:
-----------------------------------------------------------------

r+ but I don't think this will have any effect. CLOSE priority is used only during shutdown and when releasing NSPR handle. ShutdownEvent is posted after CacheStorageService is shut down so it's unlikely that any other event will be posted to the IO thread. Delaying ReleaseNSPRHandleEvent isn't a problem since the handle would be released anyway when the total number of handles would exceed the limit while opening another file.
Attachment #8704296 - Flags: review?(michal.novotny) → review+
I still think it may have some positive effect.  Let's see.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1725b75a6604
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: