Mustek - Speed - Buffer

Thomas Blume (mblum1@nightshift.uni-paderborn.de)
Mon, 12 May 1997 23:59:08 +0200

Hello David,

> Thomas> what is a reasonable size for SG_BIG_BUF? Is it possible to
> Thomas> prepare configure for profiling ?
>
> I'm using 128KB which works nicely.

Well, in the meantime I tried larger buffers and I noticed, that 127.5K
is the upper limit one could use. From SCSI-Programming-HOWTO:

13.1. Transfer Lengths

[...]
generic header as well as the command block on input. SG_BIG_BUFF can
be safely increased upto (131072 - 512). To take advantage of this, a
new kernel has to be compiled and booted, of course.

Perhaps this should be included in the sane-mustek man page to avoid
users getting messages like this:
kernel: kmalloc of too large a block (161792 bytes).

At least for me the restriction in kernel mem had been unknown before
this :-)

> However, are you saying that the Mustek backend is slower than other
> scan programs? It shouldn't be. I know there is a problem with
> 3-pass scanners, but AFAIK, 1-pass scanners perform well (with a large
> enough scsi buffer).
^^^^^^^^^^^^^^^^^^

I just had the time to make a small comparison in speed for different
resolutions. NT 4.0 data was obtained with Picture-Publisher 6.0
(bundled with MFS-1200SP), Mustek Twain module, Color scanning, times
stopped "by hand".
Linux data with sane-0.57, Linux 2.0.29, used the coordinates
I took from NT.

time scanimage -d mustek --speed Normal --mode Color \
-x 102.1 -y 146.5 --resolution $res > out.pnm 2>> scantimes.log

Pentium 133, 48MB, Adaptec 1542C

dpi sec Linux sec NT

20.00 26.81
40.00 26.87
60.00 27.43
80.00 28.45 30.00
100.00 29.24 31.00
120.00 30.31 31.00
140.00 31.72 31.00
160.00 46.01 46.00
180.00 47.68 47.00
200.00 49.91 48.00
220.00 52.55 48.00
240.00 55.06 48.00
260.00 55.57 49.00
280.00 61.10 49.00
300.00 64.50 49.00
320.00 272.36 81.00
340.00 282.31 81.00
360.00 287.75 82.00
380.00 300.88 82.00
400.00 309.66 83.00
560.00 415.46 88.00
580.00 435.00 89.00
600.00 438.76 90.00
620.00 296.01 157.00
640.00 886.09 158.00

Ok, scanning with high resolutions is not what I do normally, but
maybe some others do so. The difference is quite significant.
The "low" number at 620 dpi under Linux is reproduceable.
>From the number of "stops" under NT I estimate the buffer used to
about 2MB.
Each start/stop of the scanner sums up to a significant contribution
to scan times.

But how to obtain a larger buffer??

Thomas

-- 
Thomas Blume                          <mblum1@hrz.uni-paderborn.de>
Technische Chemie und Chemische Verfahrenstechnik, UNI-GH-Paderborn
Tel.: +49 5251 602598                          Fax: +49 5251 603244

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com