Commit 11647c6
Flush RRD only when TXGs contain data
This change modifies the behavior of spa_sync_time_logger when
flushing the RRD database.
Previously, once the sync interval elapsed, a flush would always
be generated. On solid-state devices, especially when the pool was
otherwise idle, this caused disks to wake up solely to write RRD
data. Since RRD is best-effort telemetry, this behavior is
unnecessary and wasteful.
With this change, spa_sync_time_logger delays flushing until a TXG
that already contains data is being synced. The RRD update is
appended to that TXG instead of forcing the creation of
a new write-only TXG.
During pool export, flushing is forced regardless of whether
the TXG contains user data. At that stage, data durability takes
precedence and a write must be issued.
Sponsored by: [Wasabi Technology, Inc.; Klara, Inc.]
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
Closes openzfs#18082
Closes openzfs#181381 parent a0350f6 commit 11647c6
1 file changed
+20
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2142 | 2142 | | |
2143 | 2143 | | |
2144 | 2144 | | |
2145 | | - | |
| 2145 | + | |
2146 | 2146 | | |
2147 | | - | |
| 2147 | + | |
2148 | 2148 | | |
| 2149 | + | |
| 2150 | + | |
2149 | 2151 | | |
2150 | 2152 | | |
2151 | 2153 | | |
2152 | 2154 | | |
2153 | | - | |
2154 | | - | |
2155 | | - | |
2156 | | - | |
2157 | 2155 | | |
2158 | | - | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
2159 | 2160 | | |
2160 | 2161 | | |
2161 | 2162 | | |
| |||
2164 | 2165 | | |
2165 | 2166 | | |
2166 | 2167 | | |
2167 | | - | |
| 2168 | + | |
| 2169 | + | |
2168 | 2170 | | |
2169 | 2171 | | |
2170 | 2172 | | |
2171 | 2173 | | |
2172 | 2174 | | |
2173 | 2175 | | |
2174 | 2176 | | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
2175 | 2185 | | |
2176 | 2186 | | |
2177 | 2187 | | |
| |||
2194 | 2204 | | |
2195 | 2205 | | |
2196 | 2206 | | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
| 2207 | + | |
2200 | 2208 | | |
2201 | 2209 | | |
2202 | 2210 | | |
| |||
10809 | 10817 | | |
10810 | 10818 | | |
10811 | 10819 | | |
10812 | | - | |
| 10820 | + | |
10813 | 10821 | | |
10814 | 10822 | | |
10815 | 10823 | | |
| |||
0 commit comments