Subject: UBC hurts tar extraction speed
To: None <tech-kern@netbsd.org>
From: IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>
List: tech-kern
Date: 01/03/2001 02:46:57
On the other day, I've noticed rather significant drop in tarball
extraction spped with UBC.

Here are some figures. Tests are done on a softdep ffs with a 433MHz
Celeron machine which has 256MB of RAM.

With an 1.5K kernel with 50MB of bufcache (without UBC):
    > tar zxf /usr/pkgsrc/distfiles/emacs-20.7.tar.gz 
    4.438u 3.049s 0:19.26 38.7%     0+0k 424+8202io 58pf+0w
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.6.tar.gz
    4.565u 2.961s 0:14.27 52.6%     0+0k 381+8248io 2pf+0w
    > rm -rf emacs-20.[67]
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.6.tar.gz
    4.610u 3.061s 0:10.46 73.3%     0+0k 95+8191io 0pf+0w
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.7.tar.gz
    4.567u 2.993s 0:13.52 55.8%     0+0k 361+8214io 0pf+0w
    > rm -rf emacs-20.[67]
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.7.tar.gz
    4.541u 2.794s 0:12.60 58.1%     0+0k 92+8206io 0pf+0w

With an 1.5N kernel with 40MB of bufcache (with UBC):
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.7.tar.gz
    4.459u 5.165s 0:43.43 22.1%     0+0k 141+385io 34pf+0w
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.6.tar.gz
    4.517u 5.087s 0:46.41 20.6%     0+0k 109+396io 1pf+0w
    > rm -rf emacs-20.[67]
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.7.tar.gz
    4.607u 5.132s 0:26.44 36.8%     0+0k 2+358io 0pf+0w
    > time tar zxf /usr/pkgsrc/distfiles/emacs-20.6.tar.gz
    4.506u 5.277s 0:45.34 21.5%     0+0k 2+407io 0pf+0w	


If you run iostat while extracting tarballs, you might see the likely
cause of speed drop.  Without UBC, about 40k bytes are written per
transfer.  With UBC, writes are done in smaller chunks (7~9kB per
transfer).

I'm not sure how much this speed drop affects normal usage.  Also I'm
not sure if this can be easily fixed.  I'm posting this message here
in the hope that someone takes look at this issue...

--
IWAMOTO Toshihiro