NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/50726: ffs -o discard is slow



>Number:         50726
>Category:       kern
>Synopsis:       ffs -o discard is slow
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 29 18:15:00 +0000 2016
>Originator:     David A. Holland
>Release:        NetBSD 7.99.25 (20151222)
>Organization:
>Environment:
System: NetBSD macaran 7.99.25 NetBSD 7.99.25 (MACARAN) #34: Tue Dec 22 23:55:33 EST 2015 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:

riz@ today reported that after deleting 3G of data with -o discard on
it was many seconds before the discards completed and the visible free
space stabilized. (With discard on, freed blocks don't show up as
available again until the storage-level discard operation finishes.)

There are possibly many reasons for this but a key one is that we
discard single blocks only and don't coalesce adjacent entries.

(This is not just a direct performance issue; discarding larger ranges
can be handled differently, i.e. better, by SSD firmware and result in
improved performance later on and also better wear life.)

>How-To-Repeat:

as above

>Fix:

hack hack hack, it's not trivial

(should discard requests be coalesced in ffs or at the disk level?
while all the internal plumbing I put in last time around is
synchronous so coalescing would have to be in ffs, there's something
to be said for queueing them at the disk level and letting the disk
munge pending requests. this would be even less trivial)



Home | Main Index | Thread Index | Old Index