Amanda-Users

Re: How to omit holding disk?

2004-02-03 18:17:20
Subject: Re: How to omit holding disk?
From: Josef Wolf <jw AT raven.inka DOT de>
To: Jay Lessert <jayl AT accelerant DOT net>
Date: Wed, 4 Feb 2004 00:10:17 +0100
On Mon, Feb 02, 2004 at 05:57:16PM -0800, Jay Lessert wrote:
> On Mon, Feb 02, 2004 at 11:39:24PM +0100, Josef Wolf wrote:

> Just so you are aware, this is definitely not normal behavior (extreme
> system sluggishness during a single large file copy/move)!

Hmm..

> I assume you're running some flavor of linux.  The usual suspect
> in that case is DMA not enabled on your IDE disk drive(s).  Use
> hdparm to check.  Don't let the man page scare you (too much):
> 
>     % sudo hdparm /dev/hda /dev/hdb
> 
> ...is a safe thing to do.  :-)

  raven:~ # hdparm /dev/hda  (this is the holding disk)
  /dev/hda:
   multcount    = 16 (on)
   IO_support   =  1 (32-bit)
   unmaskirq    =  1 (on)
   using_dma    =  1 (on)
   keepsettings =  0 (off)
   readonly     =  0 (off)
   readahead    =  8 (on)
   geometry     = 7297/255/63, sectors = 117231408, start = 0

  raven:~ # hdparm /dev/hdd (this is the disk for the virtual tapes)
  /dev/hdd:
   multcount    = 16 (on)
   IO_support   =  1 (32-bit)
   unmaskirq    =  1 (on)
   using_dma    =  1 (on)
   keepsettings =  0 (off)
   readonly     =  0 (off)
   readahead    =  8 (on)
   geometry     = 2491/255/63, sectors = 40020624, start = 0

  raven:~ # uname -a
  Linux raven 2.4.21-166-athlon #1 Thu Dec 18 18:24:05 UTC 2003 i686 athlon 
i386 GNU/Linux

  raven:~ # head /proc/cpuinfo
  processor       : 0
  vendor_id       : AuthenticAMD
  cpu family      : 6
  model           : 6
  model name      : AMD Athlon(tm) 4 Processor
  stepping        : 2
  cpu MHz         : 1394.065
  cache size      : 256 KB
  fdiv_bug        : no
  hlt_bug         : no

> Just a thought: one of the disks involved isn't an NFS mount, is it?

I don't use NFS.

> I made myself a 20GB file, and started a copy between two IDE
> disks on a relatively modest box:
> [ ... ]
> So that's about 26MB/s, not bad.

I tried with 4GB since I don't have that much free disk:

   raven:/m/amchanger # time dd if=/dev/zero of=t bs=1024k count=4096
   4096+0 records in
   4096+0 records out

   real    3m25.584s
   user    0m0.031s
   sys     0m15.144s

That's only 19MB/s. System slown a little bit down, but is still good usable
for interactive work.

  raven:/m/amchanger # time cp t /m/spool/tmp/t
  real    4m39.285s
  user    0m0.398s
  sys     0m25.867s

That's 14MB/s. Changing virtual desktops in kde lasts 20..30 seconds.
Pressing "UP" to access bash's history in kde's konsole lasts about 5..10
seconds.


This top output is on idle system:

  top - 23:19:51 up 5 days, 12:08, 23 users,  load average: 0.00, 0.08, 0.17
  Tasks: 141 total,   1 running, 137 sleeping,   0 stopped,   3 zombie
  Cpu(s):   1.9% user,   2.2% system,   0.0% nice,  95.9% idle
  Mem:    514224k total,   475768k used,    38456k free,    50224k buffers
  Swap:        0k total,        0k used,        0k free,   182920k cached
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
   4676 root      15   0 61376  19m  712 S  1.3  4.0   0:59.98 X


This one is when copying:

  top - 23:22:41 up 5 days, 12:11, 24 users,  load average: 2.86, 1.13, 0.54
  Tasks: 143 total,   3 running, 137 sleeping,   0 stopped,   3 zombie
  Cpu(s):   1.8% user,  22.5% system,   0.0% nice,  75.6% idle
  Mem:    514224k total,   509680k used,     4544k free,     8456k buffers
  Swap:        0k total,        0k used,        0k free,   275012k cached
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  27744 root      16   0    88   88   24 R 12.5  0.0   0:14.56 cp

As you can see, "cached" goes up (the contents of the huge file get cached)
while "free" and "buffers" go down. Everything from "buffers" gets flushed.
The 182MB from "cached" get flushed and replaced with the contents from the
copied file as well.

I can't see anything interesting in the vmstat/iostat outputs, but I include
it here to be complete:

jw@raven:~> vmstat 5
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 2  2      0   4364   8312 277240    0    0     2     9    5     8 13  3 84  0
 2  0      0   5116   7844 276964    0    0 19914 10231 1535   848  1 21 78  0
 1  1      0   4708   8044 277172    0    0 18770 18381 1618   823  1 23 75  0
 1  1      0   5340   8236 276348    0    0 19107 26817 1765   849  1 23 76  0
 1  0      0   4380   8412 277132    0    0 19479 12169 1551   827  1 21 78  0

jw@raven:~> iostat 5
Linux 2.4.21-166-athlon (raven)         03.02.2004

avg-cpu:  %user   %nice    %sys   %idle
          12,08    0,48    3,29   84,15

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
dev3-0            1,41        17,25        28,40   82084494  135164232
dev8-0            0,00         0,00         0,00       1530          0
dev8-1            0,00         0,00         0,00       1530          0
dev8-2            0,00         0,25         0,00    1211920       6196
dev8-3            0,00         0,00         0,00       1618          0
dev22-3           0,10         5,10         7,57   24279938   36054176

-- 
-- Josef Wolf -- jw AT raven.inka DOT de --

<Prev in Thread] Current Thread [Next in Thread>