From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zdenek Kabelac Subject: Re: Huge memory allocation Date: Thu, 03 Mar 2011 09:41:47 +0100 Message-ID: <4D6F544B.409@redhat.com> References: <20110301134606.GN3626@agk-dp.fab.redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Cc: device-mapper development , Eli Malul List-Id: dm-devel.ids Dne 3.3.2011 09:05, Eli Malul napsal(a): > I am expecting to have lots of (up to million) scattered extents across > some volumes which I am required to mirror. > Since mirror mapped device with a table that large consume unbearable > amount of memory (e.g. for 10,000 extents I saw about 6 Giga of memory > allocated by the device-mapper) I am going to create two linear devices > which maps these extents and mirror them. > > In addition, I am required to preserve the original extent's offsets > since they are an existing user data used by DB applications. > To achieve that I will create another linear device to simulate the > original extent's offsets which shall be mapped to the created mirrored > device so, the client will continue to read and write the same offsets. > Aren't you trying to reinvent dm-replicator target ? (available as an extra kernel patch) Maybe you should first describe exactly what are you trying to achieve. I'd guess there would be better ways to achieve that goal. Updating kernel tables is expensive operation - especially if you plan to have its size in the range of multiple megabytes - so it looks like wrong plan... Zdenek