You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to issue golang/go#43342, file.Sync operation is extremely slow.
After investigating it a bit further, I realized that for file.Sync on mac os X, it's actually a fcntl(F_FULLFSYNC) because OS X and some versions of ext3 have an fsync that doesn't really flush to disk. OS X requires fcntl(F_FULLFSYNC) to flush to disk
Apparently, F_FULLFSYNC is a lot slower than a normal file.Sync on the other platforms.
1000 file sync takes 18s on my laptop (Apple M1 Pro)
Inside of Geth, we use freezer as the chain data backend and state diff backend if path scheme is used, which always do a file.Sync after applying writes. Namely it can cause performance degradation on Mac OS X.
If the node has finished the initial state sync, then capturing up the progress made in the network should be sufficient even with slow FSYNC, but might be a disaster if people want to do a full-sync on Mac OS X.
The text was updated successfully, but these errors were encountered:
According to issue golang/go#43342,
file.Sync
operation is extremely slow.After investigating it a bit further, I realized that for
file.Sync
on mac os X, it's actually afcntl(F_FULLFSYNC)
because OS X and some versions of ext3 have an fsync that doesn't really flush to disk. OS X requires fcntl(F_FULLFSYNC) to flush to diskApparently,
F_FULLFSYNC
is a lot slower than a normalfile.Sync
on the other platforms.1000 file sync takes 18s on my laptop (Apple M1 Pro)
Inside of Geth, we use freezer as the chain data backend and state diff backend if path scheme is used, which always do a
file.Sync
after applying writes. Namely it can cause performance degradation on Mac OS X.If the node has finished the initial state sync, then capturing up the progress made in the network should be sufficient even with slow FSYNC, but might be a disaster if people want to do a full-sync on Mac OS X.
The text was updated successfully, but these errors were encountered: