Opened 8 years ago

Closed 3 years ago

#4848 closed enhancement (wontfix)

Prealloc disk space for descriptors files

Reported by: tmpname0901 Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.2.35
Severity: Normal Keywords: perf tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When I defrag my hard disk in Windows (NTFS filesystem) I usually see that the file cached-descriptors.new is in several hundred fragments on the disk. This while running a relay.

This can't be good for performance. I suggest preallocating the file of cached-descriptors.new, possibly using the size of cached-descriptors + 5% as a guide to the initial size of the newer file.

Those of who still have spinning media will thank you.

Child Tickets

Change History (5)

comment:1 Changed 8 years ago by arma

Milestone: Tor: 0.2.2.x-finalTor: 0.2.4.x-final

Man. Sounds like ntfs sucks as a filesystem. :)

For context, Tor appends descriptors to this file as it gets them, but it keeps them in ram as well. Periodically it gathers all of them, writes a new cached-descriptors file, and zeroes the cached-descriptors.new file.

comment:2 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:3 Changed 7 years ago by nickm

Component: Tor RelayTor

comment:4 Changed 7 years ago by nickm

Milestone: Tor: 0.2.4.x-finalTor: unspecified

We read this file pretty rarely; I don't think fragmentation is actually going to matter, is it?

comment:5 Changed 3 years ago by nickm

Resolution: wontfix
Severity: Normal
Status: newclosed

Going to go with the "fragmentation doesn't matter here" theory. The descriptor.new file is going to wind up severely fragmented, but we only read it at startup. What matters is the "descriptors" file, which we generate all-at-once.

Note: See TracTickets for help on using tickets.