All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 1/6] Pool locking code
Date: Wed, 23 Mar 2011 18:29:38 +0100	[thread overview]
Message-ID: <4D8A2E02.9020108@redhat.com> (raw)
In-Reply-To: <4D8A20E3.5030809@redhat.com>

Dne 23.3.2011 17:33, Zdenek Kabelac napsal(a):
> Dne 23.3.2011 16:57, Zdenek Kabelac napsal(a):
>> Dne 23.3.2011 16:13, Joe Thornber napsal(a):
>>> On Wed, 2011-03-23 at 15:54 +0100, Zdenek Kabelac wrote:
>>>> Forget to answer the size question -  >8MB is allocated by the VG
>>>> mempool when
>>>> set of simple linear 7200LVs on 1 PV are in use.
>>>
>>> So I think each snapshot/restore of a VG pool of that size is going to
>>> take ~0.1 seconds.  So now my question is how many times are we
>>> expecting to happen during a typical tool invocation?  Your previous
>>> reply suggested it happens just once?
>>
>>
>> If there would be just 1 vg read for 7200 activate call - obviously I'd not
>> need to play with this dm_pool locking :)
>>
>> So there is 7200 vg reads - which will use this one locked pool with my patch set:
>>
>> To give some time info here
>> (using my unoptimized gcc debug build on C2D 2.2GHz - but with few more
>> patches applied than current upstream)
>>
>> Deactivate 7200LV   (7200 already active)
>> real	1m16.140s
>> user	0m5.686s
>> sys	0m31.410s
>>
>>
>> Deactivate 7200LV (non active)
>> real	0m2.121s
>> user	0m1.083s
>> sys	0m1.032s
>>
>>
>> Activate 7200  (non active)
>> real	2m19.324s
>> user	0m6.503s
>> sys	1m30.785s
>>
>> Activate 7200 (7200 already active)
>> real	0m10.945s
>> user	0m1.422s
>> sys	0m9.502s
>>
> 
> I think good example could be this - when I disable mprotect-ing in my
> patchset - and enable crc checking with each dm_pool_restore (which should be
> similar to memcpy) (otherwise crc is checked only with final pool unlock)
> 
> Deactivate 7200LV
> real	1m45.353s
> user	0m38.128s
> sys	0m27.395s
> 
> Deactivate 7200LV
> real	0m36.948s
> user	0m35.284s
> sys	0m1.642s
> 
> Activate 7200  (non active)
> real	2m31.065s
> user	0m37.740s
> sys	1m18.481s
> 
> (here could be observed - thet mprotecting takes 12s)
> 
> Activate 7200 (7200 already active)
> real	0m52.188s
> user	0m35.570s
> sys	0m16.563s
> 
> 
> 
> So I'd estimate like 33seconds would be wasted.
> 
> --
> 
> And to complete the picture - crc only with unlock - and without pool
> mprotect-ing  - assuming this would be normal work.
> 
> Deactivate 7200LV
> real	1m9.989s
> user	0m4.584s
> sys	0m26.882s
> 
> Deactivate 7200LV
> real	0m2.119s
> user	0m1.087s
> sys	0m1.025s
> 
> Activate 7200  (non active)
> real	2m11.363s
> user	0m4.696s
> sys	1m15.393s
> 
> Activate 7200 (7200 already active)
> real	0m11.127s
> user	0m1.392s
> sys	0m9.669s
> 

And as the implementation of memcpy instead of crc was rather very simple -
here are exact numbers with memcpy (memcpy being somewhat faster then crc):

Deactivate 7200LV  (7200 already active)
real	1m32.725s
user	0m24.828s
sys	0m27.213s

Deactivate 7200LV (non active)
real	0m20.486s
user	0m18.239s
sys	0m2.236s

Activate 7200  (non active)
real	2m33.219s
user	0m24.777s
sys	1m19.996s

Activate 7200 (7200 already active)
real	0m36.627s
user	0m18.474s
sys	0m18.065s


Zdenek



  reply	other threads:[~2011-03-23 17:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 21:21 [PATCH 0/6] VG share v2 Zdenek Kabelac
2011-03-22 21:21 ` [PATCH 1/6] Pool locking code Zdenek Kabelac
2011-03-23 14:03   ` Joe Thornber
2011-03-23 14:43     ` Zdenek Kabelac
2011-03-23 14:53       ` Joe Thornber
2011-03-23 14:54     ` Zdenek Kabelac
2011-03-23 15:13       ` Joe Thornber
2011-03-23 15:57         ` Zdenek Kabelac
2011-03-23 16:33           ` Zdenek Kabelac
2011-03-23 17:29             ` Zdenek Kabelac [this message]
2011-03-23 18:41           ` Joe Thornber
2011-03-23 19:01             ` Zdenek Kabelac
2011-03-24 12:21               ` Joe Thornber
2011-03-24 12:45                 ` Zdenek Kabelac
2011-03-24 13:50                   ` Zdenek Kabelac
2011-03-22 21:21 ` [PATCH 2/6] Code move vg_mark_partial up in stack Zdenek Kabelac
2011-03-22 21:21 ` [PATCH 3/6] Share VG multiple times Zdenek Kabelac
2011-03-22 21:21 ` [PATCH 4/6] Use dm_pool_set_uint64 Zdenek Kabelac
2011-03-22 21:21 ` [PATCH 5/6] lv_postorder using dm_pool_set_uint64 Zdenek Kabelac
2011-03-22 21:22 ` [PATCH 6/6] lv_postorder unlock and lock Zdenek Kabelac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D8A2E02.9020108@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.