Koozali.org: home of the SME Server

Slow backup to USB drive

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
Re: Slow backup to USB drive
« Reply #15 on: June 25, 2010, 02:29:07 PM »
Alright backup is currently running and I found and installed iostat. iostat was not in any of the standard repositories so I found a link on this website: http://www.sme-server.de/download/sme7/contribs/smecontribs/index.html and you want to find: sysstat-5.0.5-25.el4.i386.rpm

Once installed I did a few tests with different timings and here is a copy of a short run, with my backup drive being sde and an ext3 partition at sde1

Code: [Select]
[root@caine tmp]# iostat -kx 4 5
Linux 2.6.9-89.0.25.ELsmp (caine)       06/25/2010

avg-cpu:  %user   %nice    %sys %iowait   %idle
           1.13    0.00    0.57   58.94   39.36

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda         69.40   1.73  4.15  1.66  588.40   27.14   294.20    13.57   105.84     0.04    6.45   2.34   1.36
sda1         0.00   0.00  0.00  0.00    0.02    0.00     0.01     0.00    49.09     0.00    5.87   5.76   0.00
sda2        69.39   1.73  4.15  1.66  588.38   27.14   294.19    13.57   105.85     0.04    6.45   2.34   1.36
sdb         69.38   1.72  4.06  1.79  587.59   28.05   293.80    14.02   105.22     0.04    6.23   2.40   1.41
sdb1         0.00   0.00  0.00  0.00    0.02    0.00     0.01     0.00    51.50     0.00    7.56   7.41   0.00
sdb2        69.38   1.72  4.06  1.79  587.57   28.05   293.78    14.02   105.22     0.04    6.23   2.40   1.41
sdc          0.01   0.00  0.00  0.71    0.03    5.70     0.02     2.85     8.04     0.00    0.33   0.33   0.02
sdc1         0.00   0.00  0.00  0.00    0.02    0.00     0.01     0.00    48.61     0.00    3.24   3.13   0.00
sdc2         0.00   0.00  0.00  0.71    0.00    5.70     0.00     2.85     8.01     0.00    0.33   0.33   0.02
sdd         69.43   1.69  4.01  1.83  587.51   28.18   293.75    14.09   105.32     0.02    3.43   2.00   1.17
sdd1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00    33.50     0.00    3.89   3.89   0.00
sdd2        69.42   1.69  4.01  1.83  587.50   28.18   293.75    14.09   105.32     0.02    3.43   2.00   1.17
md1          0.00   0.00  0.00  0.00    0.05    0.00     0.03     0.00    20.06     0.00    0.00   0.00   0.00
md2          0.00   0.00 14.46  4.36 1741.63   34.90   870.81    17.45    94.40     0.00    0.00   0.00   0.00
dm-0         0.00   0.00 14.34  4.23 1740.69   33.83   870.34    16.91    95.57     0.18    9.96   1.60   2.97
dm-1         0.00   0.00  0.12  0.13    0.93    1.08     0.47     0.54     8.00     0.00    8.13   0.38   0.01
sde          0.00   6.27  0.00  0.23    0.01   52.02     0.00    26.01   226.12     0.25 1078.53   8.64   0.20
sde1         0.00   6.27  0.00  0.23    0.01   52.02     0.00    26.01   226.12     0.25 1078.57   8.64   0.20

avg-cpu:  %user   %nice    %sys %iowait   %idle
          39.97    0.00    2.38   20.18   37.47

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda        443.11   8.52 34.09  1.50 3817.54   80.20  1908.77    40.10   109.52     0.09    2.63   2.49   8.87
sda1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda2       443.11   8.52 34.09  1.50 3817.54   80.20  1908.77    40.10   109.52     0.09    2.63   2.49   8.87
sdb        436.09  13.28 31.33  1.50 3739.35  118.30  1869.67    59.15   117.50     0.08    2.53   2.36   7.74
sdb1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdb2       436.09  13.28 31.33  1.50 3739.35  118.30  1869.67    59.15   117.50     0.08    2.53   2.36   7.74
sdc          0.00   0.00  0.00  0.50    0.00    4.01     0.00     2.01     8.00     0.00    0.00   0.00   0.00
sdc1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdc2         0.00   0.00  0.00  0.50    0.00    4.01     0.00     2.01     8.00     0.00    0.00   0.00   0.00
sdd        480.45   4.76 37.34  1.00 4142.36   46.12  2071.18    23.06   109.23     0.11    2.81   2.64  10.13
sdd1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdd2       480.45   4.76 37.34  1.00 4142.36   46.12  2071.18    23.06   109.23     0.11    2.81   2.64  10.13
md1          0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md2          0.00   0.00 96.74 14.54 11582.96  116.29  5791.48    58.15   105.14     0.00    0.00   0.00   0.00
dm-0         0.00   0.00 96.74 14.54 11582.96  116.29  5791.48    58.15   105.14     0.83    7.43   2.10  23.36
dm-1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sde          0.00 316.04  0.00 52.38    0.00 2630.58     0.00  1315.29    50.22    21.92  557.71   5.60  29.35
sde1         0.00 316.04  0.00 52.38    0.00 2630.58     0.00  1315.29    50.22    21.92  557.71   5.60  29.35

avg-cpu:  %user   %nice    %sys %iowait   %idle
          38.52    0.00    2.51   19.95   39.02

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda        393.72  10.80 32.16  1.26 3407.04   96.48  1703.52    48.24   104.84     0.09    2.77   2.60   8.69
sda1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda2       393.72  10.80 32.16  1.26 3407.04   96.48  1703.52    48.24   104.84     0.09    2.77   2.60   8.69
sdb        449.75  10.80 35.68  1.01 3885.43   94.47  1942.71    47.24   108.49     0.11    3.12   3.12  11.43
sdb1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdb2       449.75  10.80 35.68  1.01 3885.43   94.47  1942.71    47.24   108.49     0.11    3.12   3.12  11.43
sdc          0.00   0.00  0.00  0.50    0.00    4.02     0.00     2.01     8.00     0.00    0.50   0.50   0.03
sdc1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdc2         0.00   0.00  0.00  0.50    0.00    4.02     0.00     2.01     8.00     0.00    0.50   0.50   0.03
sdd        442.96   0.00 34.67  0.75 3823.12    6.03  1911.56     3.02   108.09     0.10    2.82   2.82   9.97
sdd1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdd2       442.96   0.00 34.67  0.75 3823.12    6.03  1911.56     3.02   108.09     0.10    2.82   2.82   9.97
md1          0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md2          0.00   0.00 98.24 11.56 11023.12   92.46  5511.56    46.23   101.24     0.00    0.00   0.00   0.00
dm-0         0.00   0.00 98.24 11.56 11023.12   92.46  5511.56    46.23   101.24     0.64    5.84   2.45  26.88
dm-1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sde          0.00 1104.52  0.00 41.96    0.00 9171.86     0.00  4585.93   218.59    18.26  435.22   5.81  24.37
sde1         0.00 1104.52  0.00 41.96    0.00 9171.86     0.00  4585.93   218.59    18.26  435.22   5.81  24.37

avg-cpu:  %user   %nice    %sys %iowait   %idle
          39.60    0.00    2.63   24.31   33.46

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda        419.05  19.30 36.09  7.52 3641.10  214.54  1820.55   107.27    88.41     1.52   34.94   3.37  14.71
sda1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda2       419.05  19.30 36.09  7.52 3641.10  214.54  1820.55   107.27    88.41     1.52   34.94   3.37  14.71
sdb        411.53  20.05 31.83  9.77 3544.86  238.60  1772.43   119.30    90.94     0.98   23.49   3.50  14.56
sdb1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdb2       411.53  20.05 31.83  9.77 3544.86  238.60  1772.43   119.30    90.94     0.98   23.49   3.50  14.56
sdc          0.00   0.00  0.00  1.00    0.00    8.02     0.00     4.01     8.00     0.00    0.25   0.25   0.03
sdc1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdc2         0.00   0.00  0.00  1.00    0.00    8.02     0.00     4.01     8.00     0.00    0.25   0.25   0.03
sdd        412.28  13.28 33.58 11.03 3564.91  194.49  1782.46    97.24    84.27     0.26    5.79   2.68  11.95
sdd1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdd2       412.28  13.28 33.58 11.03 3564.91  194.49  1782.46    97.24    84.27     0.26    5.79   2.68  11.95
md1          0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md2          0.00   0.00 84.96 39.35 10450.13  314.79  5225.06   157.39    86.60     0.00    0.00   0.00   0.00
dm-0         0.00   0.00 84.96 39.35 10450.13  314.79  5225.06   157.39    86.60     5.05   40.59   2.29  28.47
dm-1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sde          0.00 1112.03  0.00 41.10    0.00 9225.06     0.00  4612.53   224.44    24.81  603.71   7.39  30.38
sde1         0.00 1112.03  0.00 41.10    0.00 9225.06     0.00  4612.53   224.44    24.81  603.71   7.39  30.38

avg-cpu:  %user   %nice    %sys %iowait   %idle
          33.46    0.00    2.52   27.92   36.10

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda        382.21  12.53 37.84  2.01 3360.40  116.29  1680.20    58.15    87.25     0.13    3.26   3.07  12.23
sda1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda2       382.21  12.53 37.84  2.01 3360.40  116.29  1680.20    58.15    87.25     0.13    3.26   3.07  12.23
sdb        423.06   0.75 40.60  1.00 3709.27   14.04  1854.64     7.02    89.49     0.12    2.83   2.82  11.73
sdb1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdb2       423.06   0.75 40.60  1.00 3709.27   14.04  1854.64     7.02    89.49     0.12    2.83   2.82  11.73
sdc          0.00   0.00  0.00  0.50    0.00    4.01     0.00     2.01     8.00     0.00    0.00   0.00   0.00
sdc1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdc2         0.00   0.00  0.00  0.50    0.00    4.01     0.00     2.01     8.00     0.00    0.00   0.00   0.00
sdd        381.20  11.78 35.34  2.01 3332.33  110.28  1666.17    55.14    92.19     0.11    3.00   3.00  11.20
sdd1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdd2       381.20  11.78 35.34  2.01 3332.33  110.28  1666.17    55.14    92.19     0.11    3.00   3.00  11.20
md1          0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md2          0.00   0.00 105.51 14.29 10287.72  114.29  5143.86    57.14    86.83     0.00    0.00   0.00   0.00
dm-0         0.00   0.00 105.51 14.29 10287.72  114.29  5143.86    57.14    86.83     0.73    6.07   2.74  32.86
dm-1         0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sde          0.00 982.21  0.00 36.09    0.00 8146.37     0.00  4073.18   225.72    15.02  416.21   6.72  24.26
sde1         0.00 982.21  0.00 36.09    0.00 8146.37     0.00  4073.18   225.72    15.02  416.21   6.72  24.26

Whilst some of the values vary, I did notice that I dod have a lot of bottlenecks with iowait. This is confirmed when I run top, as wa value is what is left of the 100% not used by the other processors, so it was up in the 80s & 90s constantly.

So I did a little bit of googling and found that High Wait with iowait is a known problem for people with some versions of the kernel. Obviously updating the kernel is not really an option, but could anyone offer some advice as to how to remove the wait?

I am "waiting" in anticipation  :P

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Slow backup to USB drive
« Reply #16 on: June 25, 2010, 07:51:32 PM »
girkers

Quote
iostat was not in any of the standard repositories so I found a link on this website: http://www.sme-server.de/download/sme7/contribs/smecontribs/index.html and you want to find: sysstat-5.0.5-25.el4.i386.rpm

You could have just done
yum install --enablerepo=smecontribs sysstat
« Last Edit: June 25, 2010, 09:05:05 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
Re: Slow backup to USB drive
« Reply #17 on: June 25, 2010, 11:33:31 PM »
mary,

I actually tried with the base repository as I found a forum post that was where it was, however it did not find it and it is also not in any of the standard repositories. I perhaps would had tried your command line if it was documented anywhere but alas it was not. Thanks for the assist, however now that I have it installed and I have confirmed what the problem is where to know?

Thanks

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Slow backup to USB drive
« Reply #18 on: June 26, 2010, 02:55:25 AM »
girkers

The block size should not be an issue. makefs will auto determine the best block size for your drive. 4096 sounds correct and was the default value on my 1Tb USB drive.
You still do not tell us/me what your sustained transfer rate was when copying a large file from your server HDD to your USB drive eg  mount the USB drive & copy a 1Gb file and note the sustained steady transfer rate that you see in the mc copy window.

Note whether your system is busy or not using say htop or top -i
Ideally you would do this copy test under quiet conditions when the server is idling and doing very little, otherwise other system tasks will distort the result.
This should give you a real world transfer speed that the components are capable of.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Slow backup to USB drive
« Reply #19 on: June 26, 2010, 11:35:37 PM »
I simple sugestion: compare your internal HDD and your external HDD (USB) speed using hdparm.

Use: hdparm -tT /dev/hda

See below my results and the other server:
my own server wit Pentium III 1GHz + 500GB IDE
Code: [Select]
[root@lobo ~]# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   488 MB in  2.04 seconds = 238.67 MB/sec
 Timing buffered disk reads:   96 MB in  3.08 seconds =  31.13 MB/sec
another server, a Dell PE1900 with 2x SCSI HDD
Code: [Select]
[root@pantera ~]# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   10020 MB in  2.00 seconds = 5015.78 MB/sec
 Timing buffered disk reads:  202 MB in  3.03 seconds =  66.68 MB/sec

Sorry I have no external USB HDD to try.

Good luck

Jáder
...

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
Re: Slow backup to USB drive
« Reply #20 on: June 26, 2010, 11:40:53 PM »
I did a test as mary suggested and transferring a 1.4GB the speed in the end of the transfer is 55MB/s so I know the external drive is capable of the transfer speed needed. From my testing with iostat I found that the transfer speed starts out fine, but slow done due to iowait issues. At least I know it is not the drive speeds.

So anyone know how I can diagnose high iowait problems that brings my transfer rate down to about 1MB/s to my external HDD.

Thanks

Offline Igi2003

  • *****
  • 226
  • +0/-0
Re: Slow backup to USB drive
« Reply #21 on: June 27, 2010, 01:20:05 AM »
Why does your Backup took so long?
1.) Because your USB Drive is slow. The physical speed is slower than the theoretical speed.
2.) Because your CPU must compress the files and create one archive file.
3.) Because your Server has not multiple CPU´s like an professional Server (8-32 or more CPU´s)
4.) Because your RAM is too little.

My SME take four hours for 200GB only copy, not compress. It´s an E8400 Core2Duo with 4GB RAM.

If your Server must be faster, so you need another Hardware.

The speed you have, is absolutelly normal.

Igi

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
Re: Slow backup to USB drive
« Reply #22 on: June 27, 2010, 01:26:21 AM »
Igi2003,

Thanks for your thoughts, but unfortunately you are wrong on most counts. This hardware I am backing up on was doing the backup in about 8 hours with a different USB drive, bought bigger USB drive and backup not working properly. So:

1.) Drive is not slow as I showed with the post just prior to yours, 55MB/s to transfer 1.4GB file
2.) I have changed the compression to 0 and it made no difference
3.) It is a dual Celeron (yes not the best) but the backup has work previously so I don't believe to be an issue
4.) I have 4GB RAM and my system is stock standard SME with zarafa contrib and 3 users and only 1 heavy mail user.

So anyone else with some thoughts.

Offline Igi2003

  • *****
  • 226
  • +0/-0
Re: Slow backup to USB drive
« Reply #23 on: June 27, 2010, 01:45:26 AM »
If it is so, then you have an Problem between your USB Controller and your USB HDD and their controller.
Check this with an different USB2.0 Controller Card whitch has an other Chipset as your Onboard Controller..

After update, your server is running the SMP Kernel and use both CPU´s or the UP Kernel with One CPU use?

Igi

PS. My WD500 USB HDD won´t work correctly with VIA USB Chipset. With Intel Chipset, no Problems.

Offline girkers

  • *
  • 296
  • +0/-0
    • gk computer services
Re: Slow backup to USB drive
« Reply #24 on: June 27, 2010, 01:56:45 AM »
If you looked at my post at the top of page 2 you would have seen that I am using Linux 2.6.9-89.0.25.ELsmp, here is the details of my CPU:
Code: [Select]
[root@caine ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Celeron(R) CPU        E1400  @ 2.00GHz
stepping        : 13
cpu MHz         : 2000.000
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est tm2 xtpr
bogomips        : 4002.38

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Celeron(R) CPU        E1400  @ 2.00GHz
stepping        : 13
cpu MHz         : 2000.000
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est tm2 xtpr
bogomips        : 3999.90

I get what you are saying about chipsets and USB but if there was a compatibility problem normal transfers would be affected which they are not. Also I was previously using Western Digital drives and that is what I am using again now.