[Drbd-dev] DRBD8: Resync speed reporting not accurate

Montrose, Ernest Ernest.Montrose at stratus.com
Fri Mar 16 20:24:06 CET 2007


Hi all,
We are seeing a problem where  resyncing multiple drbd volumes
say r0,r1,r2 reports the wrong sync speed stats.  It seems to get worst
and worst.  So r0 would report 30meg/S, r1 19Meg/sec and r2 9Meg/sec.
These rates are not the true rates except for the first one. In reality,
all the volumes took the same time to resync and they have the same
size.
 
The problem I think is that while one volume is Syncing the next volume
in 
PauseSyncX get some activity and ends up calling __drbd_set_in_sync() 
from the asender thread.  When this happens rs_mark_time gets reset as
well
as rs_mark_left.  To illustrate this the change below would force the
problem
to go away.  I am not sure this is the correct patch though:
 
Index: drbd/drbd_actlog.c
===================================================================
--- drbd/drbd_actlog.c  (revision 11975)
+++ drbd/drbd_actlog.c  (working copy)
@@ -960,10 +960,12 @@
                // we need the lock for drbd_try_clear_on_disk_bm
                if(jiffies - mdev->rs_mark_time > HZ*10) {
                        /* should be roling marks, but we estimate only
anyways. */
-                      if( mdev->rs_mark_left !=
drbd_bm_total_weight(mdev)) {
-                              mdev->rs_mark_time =jiffies;
-                              mdev->rs_mark_left
=drbd_bm_total_weight(mdev);
-                      }
+                      if( (mdev->rs_mark_left !=
drbd_bm_total_weight(mdev)) &&
+            mdev->state.conn != PausedSyncT &&
+            mdev->state.conn != PausedSyncS ) {
+            mdev->rs_mark_time =jiffies;
+            mdev->rs_mark_left =drbd_bm_total_weight(mdev);
+        }
                }
                if( inc_local_if_state(mdev,Attaching) ) {
 
drbd_try_clear_on_disk_bm(mdev,sector,count,TRUE);
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linbit.com/pipermail/drbd-dev/attachments/20070316/adb9daa6/attachment.htm


More information about the drbd-dev mailing list