trafficserver
trafficserver copied to clipboard
Parallel dir entry sync options
The idea here is to allow a configurable amount of directory synchronization to disk, where -1 means "as much parallelism as there are drives". This does have the downside of consuming additional memory during the sync phase.
The default is no parallelization still (same behavior as before). This does however move the sync continuation to the ET_TASK threads, even though most of their work is done on the AIO threads (but feels more correct to move these away from ET_NET).
Behavior with the setting set to "1":
[Nov 4 17:38:31.792] [ET_NET 1] DIAG: <CacheDir.cc:888 (dir_sync_init)> (dir_sync) Disk /tmp/CACHE2/cache.db: 4 stripe(s) assigned to task 0
[Nov 4 17:38:31.792] [ET_NET 1] DIAG: <CacheDir.cc:888 (dir_sync_init)> (dir_sync) Disk /tmp/CACHE/cache.db: 4 stripe(s) assigned to task 0
Behavior when set to -1:
[Nov 4 17:39:56.977] [ET_NET 1] DIAG: <CacheDir.cc:888 (dir_sync_init)> (dir_sync) Disk /tmp/CACHE/cache.db: 4 stripe(s) assigned to task 0
[Nov 4 17:39:56.977] [ET_NET 1] DIAG: <CacheDir.cc:888 (dir_sync_init)> (dir_sync) Disk /tmp/CACHE2/cache.db: 4 stripe(s) assigned to task 1