<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>FW: e2defrag - Unable to allocate buffer for inode priorities</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>I have now upgraded my server from 1.5G of RAM to 4G of RAM. It get's a bit longer, it now looks like this with strace:<BR>
<BR>
mmap2(NULL, 1903955968, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x464a7000<BR>
 (15 second delay)<BR>
mmap2(NULL, 475992064, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x29eb6000<BR>
 (this I didn't have memory enough to before)<BR>
mmap2(NULL, 1903955968, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)<BR>
 (here it wants another 2G RAM, sorry I dont have 2G-modules .. )<BR>
<BR>
So if noone has any idea, I am stuck until I can find 4 pieces of 2G DDR400 modules. :(<BR>
<BR>
--<BR>
Magnus Månsson<BR>
<BR>
<BR>
-----Original Message-----<BR>
From:   Magnus Månsson<BR>
Sent:   Fri 10/13/2006 4:32 PM<BR>
To:     ext3-users@redhat.com<BR>
Cc:     Magnus Månsson<BR>
Subject:        FW: e2defrag - Unable to allocate buffer for inode priorities<BR>
I have made some more research and found out the following ..<BR>
<BR>
thor:~# df -i<BR>
Filesystem            Inodes   IUsed   IFree IUse% Mounted on<BR>
-[cut]-<BR>
/dev/mapper/vgraid-data<BR>
                     475987968  227652 475760316    1% /data<BR>
<BR>
<BR>
thor:~# strace e2defrag -r /dev/vgraid/data<BR>
-[cut]-<BR>
mmap2(NULL, 1903955968, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)<BR>
= 0x46512000<BR>
 (delay 15 seconds while allocating memory)<BR>
mmap2(NULL, 475992064, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =<BR>
 -1 ENOMEM (Cannot allocate memory)<BR>
-[cut]-<BR>
<BR>
The first allocation seems to be 4 bytes per available inode on my filesystem. I wish now that I created the FS with less inodes, and there is another question. What's the gain of having less available inodes? If I recreated my filesystem, would it be an idea to make one inode per hundred block or something since that still is way more than I need? Would I gain speed from it?<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Magnus Månsson<BR>
Sent: den 13 oktober 2006 14:14<BR>
To: 'ext3-users@redhat.com'<BR>
Subject: e2defrag - Unable to allocate buffer for inode priorities<BR>
<BR>
Hi, first of all, apologies if this isn't the right mailing list but it was the best I could find. If you know a better mailing list, please tell me.<BR>
<BR>
Today I tried to defrag one of my filesystems. It's a 3.5T large filesystem that has 6 software-raids in the bottom and then merged together using lvm. I was running ext3 but removed the journal flag with thor:~# tune2fs -O ^has_journal /dev/vgraid/data<BR>
<BR>
After that I fsckd just to be sure I wouldnt meet any unexpected problems.<BR>
<BR>
So now it was time to defrag, I used this command:<BR>
thor:~# e2defrag -r /dev/vgraid/data<BR>
<BR>
After about 15 seconds (after it ate all my 1.5G of RAM) I got this answer:<BR>
e2defrag (/dev/vgraid/data): Unable to allocate buffer for inode priorities<BR>
<BR>
I am using Debian unstable and here is the version information from e2defrag:<BR>
thor:~# e2defrag -V<BR>
e2defrag 0.73pjm1<BR>
RCS version $Id: defrag.c,v 1.4 1997/08/17 14:23:57 linux Exp $<BR>
<BR>
I also tried to use -p 256, -p 128, -p 64 to see if it used less memory then, it didn't seem like that to me, took the same time for the program to abort.<BR>
<BR>
<BR>
Is there any way to get around this problem? The answer might be to get 10G of RAM, but that's not very realistic, 2G sure, but I think that's the limit on my motherboard. A huge amount of swapfiles may solve it, and that's probably doable, but it will be enormous slow I guess?<BR>
<BR>
Why do I want to defrag? Well, fsck gives this nice info to me:<BR>
/dev/vgraid/data: 227652/475987968 files (41.2% non-contiguous), 847539147/951975936 blocks<BR>
<BR>
41% sounds like a lot in my ears and I am having a constant read of files on the drives, it's to slow already.<BR>
<BR>
<BR>
Very thankful for ideas or others experiences, maybe it's just not possible with such large partition with todays tools, hey ext[23] only supports 4T. Let's hope ext4 comes within a year in the mainstream kernels.<BR>
<BR>
<BR>
PS! Please CC me since I am not on the list so I dont have to wait for marc's archive to get the mails.<BR>
<BR>
--<BR>
Magnus Månsson<BR>
Systems administrator<BR>
Massive Entertainment AB<BR>
Malmö, Sweden<BR>
Office: +46-40-6001000<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>