- Some docs and web updates with minor fixes.

- Default number of IO threads for vdisks on systems with context-RA increased, because context-RA handles multitreaded sequential IO much better.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1070 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2009-09-03 11:53:48 +00:00
parent 7d65deaac8
commit f8f89ad8be
5 changed files with 66 additions and 24 deletions
+29 -10
View File
@@ -339,11 +339,11 @@ Module scst supports the following parameters:
default it is approximately TotalMem/4.
SCST "/proc" commands
SCST /proc commands
---------------------
For communications with user space programs SCST provides proc-based
interface in "/proc/scsi_tgt" directory. It contains the following
interface in /proc/scsi_tgt directory. It contains the following
entries:
- "help" file, which provides online help for SCST commands
@@ -370,14 +370,17 @@ entries:
- "version" file, which shows version of SCST
- "trace_level" file, which allows to read and set trace (logging) level
for SCST. See "help" file for list of trace levels. If you want to
enable logging options, which produce a lot of events, like "debug",
to not loose logged events you should also:
for SCST. See /proc/scsi_tgt/help file for list of commands and
trace levels. If you want to enable logging options, which produce a
lot of events, like "debug", to not loose logged events you should
also:
* Increase in .config of your kernel CONFIG_LOG_BUF_SHIFT variable
to much bigger value, then recompile it. For example, I use 25,
but to use it I needed to modify the maximum allowed value for
CONFIG_LOG_BUF_SHIFT in the corresponding Kconfig.
to much bigger value, then recompile it. For example, value 25
will provide good protection from logging overflow aven under
high volume of loggin events, but to use it you will need to
modify the maximum allowed value for CONFIG_LOG_BUF_SHIFT in the
corresponding Kconfig file.
* Change in your /etc/syslog.conf or other config file of your favorite
logging program to store kernel logs in async manner. For example,
@@ -573,10 +576,10 @@ LUNs in them.
VDISK device handler
--------------------
After loading VDISK device handler creates in "/proc/scsi_tgt/"
After loading VDISK device handler creates in /proc/scsi_tgt/
subdirectories "vdisk" and "vcdrom". They have similar layout:
- "trace_level" and "type" files as described for other dev handlers
- "trace_level" and "type" files as described above
- "help" file, which provides online help for VDISK commands
@@ -647,6 +650,22 @@ mode is used.
For example, "echo "open disk1 /vdisks/disk1" >/proc/scsi_tgt/vdisk/vdisk"
will open file /vdisks/disk1 as virtual FILEIO disk with name "disk1".
Also the VDISK handler has module parameter "num_threads", which
specifies count of I/O threads for each VDISK's device. If you have a
workload, which tends to produce rather random accesses (e.g. DB-like),
you should increase this count to a bigger value, like 32. If you have a
rather sequential workload, you should decrease it to a lower value,
like number of CPUs on the target or even 1. Due to some limitations of
Linux I/O subsystem, increasing number of I/O threads leads to
performance drop, especially with deadline scheduler, so decreasing it
can improve sequential performance. The default provides a good
compromise between random and sequential accesses.
You shouldn't be afraid to have too many VDISK I/O threads if you have
many VDISK devices. Kernel threads consume very little amount of
resources (several KBs) and only necessary threads will be used by SCST,
so the threads will not trash your system.
CAUTION: If you partitioned/formatted your device with block size X, *NEVER*
======== ever try to export and then mount it (even accidentally) with another
block size. Otherwise you can *instantly* damage it pretty
+29 -10
View File
@@ -257,11 +257,11 @@ Module scst supports the following parameters:
consumed by the SCST commands for data buffers at any given time. By
default it is approximately TotalMem/4.
SCST "/proc" commands
SCST /proc commands
---------------------
For communications with user space programs SCST provides proc-based
interface in "/proc/scsi_tgt" directory. It contains the following
interface in /proc/scsi_tgt directory. It contains the following
entries:
- "help" file, which provides online help for SCST commands
@@ -288,14 +288,17 @@ entries:
- "version" file, which shows version of SCST
- "trace_level" file, which allows to read and set trace (logging) level
for SCST. See "help" file for list of trace levels. If you want to
enable logging options, which produce a lot of events, like "debug",
to not loose logged events you should also:
for SCST. See /proc/scsi_tgt/help file for list of commands and
trace levels. If you want to enable logging options, which produce a
lot of events, like "debug", to not loose logged events you should
also:
* Increase in .config of your kernel CONFIG_LOG_BUF_SHIFT variable
to much bigger value, then recompile it. For example, I use 25,
but to use it I needed to modify the maximum allowed value for
CONFIG_LOG_BUF_SHIFT in the corresponding Kconfig.
to much bigger value, then recompile it. For example, value 25
will provide good protection from logging overflow aven under
high volume of loggin events, but to use it you will need to
modify the maximum allowed value for CONFIG_LOG_BUF_SHIFT in the
corresponding Kconfig file.
* Change in your /etc/syslog.conf or other config file of your favorite
logging program to store kernel logs in async manner. For example,
@@ -489,10 +492,10 @@ LUNs in them.
VDISK device handler
--------------------
After loading VDISK device handler creates in "/proc/scsi_tgt/"
After loading VDISK device handler creates in /proc/scsi_tgt/
subdirectories "vdisk" and "vcdrom". They have similar layout:
- "trace_level" and "type" files as described for other dev handlers
- "trace_level" and "type" files as described above
- "help" file, which provides online help for VDISK commands
@@ -563,6 +566,22 @@ mode is used.
For example, "echo "open disk1 /vdisks/disk1" >/proc/scsi_tgt/vdisk/vdisk"
will open file /vdisks/disk1 as virtual FILEIO disk with name "disk1".
Also the VDISK handler has module parameter "num_threads", which
specifies count of I/O threads for each VDISK's device. If you have a
workload, which tends to produce rather random accesses (e.g. DB-like),
you should increase this count to a bigger value, like 32. If you have a
rather sequential workload, you should decrease it to a lower value,
like number of CPUs on the target or even 1. Due to some limitations of
Linux I/O subsystem, increasing number of I/O threads leads to
performance drop, especially with deadline scheduler, so decreasing it
can improve sequential performance. The default provides a good
compromise between random and sequential accesses.
You shouldn't be afraid to have too many VDISK I/O threads if you have
many VDISK devices. Kernel threads consume very little amount of
resources (several KBs) and only necessary threads will be used by SCST,
so the threads will not trash your system.
CAUTION: If you partitioned/formatted your device with block size X, *NEVER*
======== ever try to export and then mount it (even accidentally) with another
block size. Otherwise you can *instantly* damage it pretty
+5
View File
@@ -232,7 +232,12 @@ struct scst_vdisk_thr {
static struct kmem_cache *vdisk_thr_cachep;
static struct kmem_cache *blockio_work_cachep;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
#define DEF_NUM_THREADS 5
#else
/* Context RA patch supposed to be applied on the kernel */
#define DEF_NUM_THREADS 8
#endif
static int num_threads = DEF_NUM_THREADS;
module_param_named(num_threads, num_threads, int, S_IRUGO);
+2 -3
View File
@@ -1293,7 +1293,6 @@ int sgv_pool_init(struct sgv_pool *pool, const char *name,
{
int res = -ENOMEM;
int i;
struct sgv_pool_obj *obj;
TRACE_ENTRY();
@@ -1335,8 +1334,8 @@ int sgv_pool_init(struct sgv_pool *pool, const char *name,
TRACE_MEM("name %s, sizeof(*obj)=%zd, clustering_type=%d, "
"single_alloc_pages=%d, max_caches=%d, max_cached_pages=%d",
name, sizeof(*obj), clustering_type, single_alloc_pages,
pool->max_caches, pool->max_cached_pages);
name, sizeof(struct sgv_pool_obj), clustering_type,
single_alloc_pages, pool->max_caches, pool->max_cached_pages);
strncpy(pool->name, name, sizeof(pool->name)-1);
pool->name[sizeof(pool->name)-1] = '\0';
+1 -1
View File
@@ -167,7 +167,7 @@ ORDERED commands</th> <td> + </td> <td> + </td> <td> -, <br/> data
<th align="left"> Persistent Reservations <br/>
<small> (Windows 2008 clustering / RHEL5 I/O fencing)</small></th> <td> Under development,
patch is <a href=
"http://sourceforge.net/mailarchive/forum.php?thread_name=4A72ECF1.2090906%40vlnb.net&forum_name=scst-devel">
"http://sourceforge.net/mailarchive/message.php?msg_name=4A9C21DE.6050700%40open-e.com">
available</a> for
testing</td> <td> - </td> <td> - </td> <td> Under development</td>
</tr>