[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: syncrepl consumer is slow
- To: openldap-devel@openldap.org
- Subject: Re: syncrepl consumer is slow
- From: Emmanuel Lécharny <elecharny@gmail.com>
- Date: Tue, 03 Feb 2015 14:16:34 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=K+luSGlZgfShII5xSMXIFZVOnWOyrPOieNgR31Q1nuE=; b=bka0V57d6DHixlk/EDwqmo8PfQ4RTDwgy7PUYN52w4nRcTTXvB3jDNDQpgq+pptBB5 EF98awIoWVNwvuk3SaY0PuerW/yRZJ458hFfl6T+f56j2bvvQ8xpsPoUva7c96MceoEJ MyKnJztcUL6cm29d8DfTQJZhguyxUIl+pifNbMxYob7PyvuiG+HhN6yvhrluOD78Vxtw r4H+sZgNxsF3mkWYad+x6o8SIKXpvyKeZontk7zwPIr6M0kWMXrURnfekpyHsekK15Bt Jdxv+hLaWUkNA385SE9kZjJ08Z9CZT+Gfe4P6W1WN7UkUM7QpN5pv/mC14Qr2z7t9uvw fmIw==
- In-reply-to: <54D09ADF.8000803@symas.com>
- References: <54C9A511.8000800@symas.com> <54CB4D24.7080106@usit.uio.no> <54D04A86.20302@symas.com> <54D05908.5080107@gmail.com> <54D089BA.5020007@symas.com> <54D09782.8040405@gmail.com> <54D098F1.40402@symas.com> <54D09ADF.8000803@symas.com>
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
Le 03/02/15 10:54, Howard Chu a écrit :
> Howard Chu wrote:
>> Emmanuel Lécharny wrote:
>>> Le 03/02/15 09:41, Howard Chu a écrit :
>>>> Emmanuel Lécharny wrote:
>>>>> Le 03/02/15 05:11, Howard Chu a écrit :
>>>>>> Another option here is simply to perform batching. Now that we have
>>>>>> the TXN api exposed in the backend interface, we could just batch up
>>>>>> e.g. 500 entries per txn. much like slapadd -q already does.
>>>>>> Ultimately we ought to be able to get syncrepl refresh to occur at
>>>>>> nearly the same speed as slapadd -q.
>>>>>
>>>>> Batching is ok, except that you never know how many entries you'll
>>>>> going
>>>>> to have, thus you will have to actually write the data after a
>>>>> period of
>>>>> time, even if you don't have the 500 entries.
>>>>
>>>> This isn't a problem - we know exactly when refresh completes, so we
>>>> can finish the batch regardless of how many entries are left over.
>>>
>>> True for Refresh. I was thinking more specifically of updates when we
>>> are connected.
>>
>> None of this is for Persist phase, I have only been talking about
>> refresh.
Thanks for the clarification.
>>
>>>> Testing this out with the experimental ITS#8040 patch - with lazy
>>>> commit the 2.8M entries (2.5GB data) takes ~10 minutes for the refresh
>>>> to pull them across. With batching 500 entries/txn+lazy commit it
>>>> takes ~7 minutes, a decent improvement. It's still 2x slower than
>>>> slapadd -q though, which loads the data in 3-1/2 minutes.
>>>
>>> Not bad at all. What makes it 2x slower, btw?
>>
>> Still looking into it. slapadd -q uses 2 threads, one to parse the LDIF
>> and one to write to the DB. syncrepl consumer only uses 1 thread.
>> Probably if we split reading from the network apart from writing to the
>> DB, that would make the difference.
That would worth a try. Although I can expect the disk access to be the
bottleneck here, and using two threads migth swamp the memory, up to a
point. Intersting problem, intersting bechnhmark to conduct ;-)
Emmanuel.