(1) "write-cache off"
In default setting the write cache is enabled(write-cache on). Therefore I/O is issued via write-back mode
and the I/O is cached on dirty cache.
If we use "write-cache off", Write I/O is issued via write-through mode and the write I/O is not cached.
Read I/O is still cached even where we user this parameter. So read I/O can keep good performance.
(2) "--bsoflags direct"
When we use this parameter, both Read and Write I/O are issued without dirty cache and buffer cache.
Using this parameter, we can suppress increasing buffer cache via tgtd's I/O.
I think these parameters should be used case by case basis.
There are two parameters related to cache.
(1) "write-cache off"
In default setting the write cache is enabled(write-cache on). Therefore I/O is issued via write-back mode
and the I/O is cached on dirty cache.
If we use "write-cache off", Write I/O is issued via write-through mode and the write I/O is not cached.
Read I/O is still cached even where we user this parameter. So read I/O can keep good performance.
(2) "--bsoflags direct"
When we use this parameter, both Read and Write I/O are issued without dirty cache and buffer cache.
Using this parameter, we can suppress increasing buffer cache via tgtd's I/O.
I think these parameters should be used case by case basis.