From: cy6erGn0m Subject: Re: No space left on device after many files creation Date: Tue, 13 Apr 2010 10:35:23 +0400 Message-ID: <4BC410AB.1030607@gmail.com> References: <4BC38EB9.8080501@gmail.com> <4BC39098.4030704@redhat.com> <4BC39762.9080406@gmail.com> <4BC39805.7090807@redhat.com> <20100412224429.GN1849@thunk.org> Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms030603020202010904090806" Cc: Eric Sandeen , linux-ext4@vger.kernel.org To: tytso@mit.edu Return-path: Received: from mail-ew0-f220.google.com ([209.85.219.220]:65103 "EHLO mail-ew0-f220.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260Ab0DMGf2 (ORCPT ); Tue, 13 Apr 2010 02:35:28 -0400 Received: by ewy20 with SMTP id 20so2351465ewy.1 for ; Mon, 12 Apr 2010 23:35:26 -0700 (PDT) In-Reply-To: <20100412224429.GN1849@thunk.org> Sender: linux-ext4-owner@vger.kernel.org List-ID: This is a cryptographically signed message in MIME format. --------------ms030603020202010904090806 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tytso@mit.edu wrote: > On Mon, Apr 12, 2010 at 05:00:37PM -0500, Eric Sandeen wrote: > =20 >> cy6erGn0m wrote: >> =20 >>> In the past I have done the same test for ext3 and it was created ~10= M >>> files in one firectory at working filesystem (/home) and it was no >>> issues reached. >>> >>> On ext4 i found inodes max size is limited as you wrote: >>> [root@cgmachine sandbox]# df -i /e4 >>> =D0=A4=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=D0=B0=D1=8F =D1=81=D0=B8=D1=81=D1= =82=D0=B5=D0=BC=D0=B0 =D0=98=D0=BD=D0=BE=D0=B4=D0=BE=D0=B2 =D0=98=D1= =81=D0=BF=D0=BE=D0=BB =D0=A1=D0=B2=D0=BE=D0=B1 =D0=98=D1=81=D0=BF % =D1= =81=D0=BC=D0=BE=D0=BD=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0 =D0= =BD=D0=B0 >>> (file system/inodes/used/free/used%/mounted on) >>> /dev/sda4 1,8M 1,8M 0 100% /e4 >>> [root@cgmachine sandbox]# >>> >>> Why inodes count limit is so small by default? Is it depends on >>> partition size? >>> =20 >> it does depend on partition size; the inode_ratio =3D 16384 in mke2fs.= conf >> says 1 inode per 16k of filesystem space. >> =20 > > 1.8 million inodes is hardly small..... most people complain that > we're reserving too much space for inodes. =20 > > Cy6erGn0m, What is your use case where the average file size for your > 20G partition is smaller that 16k? > > - Ted > =20 I use filysystem as Set data structure to make fast checks from scripts. Of course I can make long long file and test it with grep but it's will have linear performance degradation (List), at the same time file system has efficient tree binary structures (smth. like TreeSet). So, using filesystem is the simplest way to do this efficient. Also I always have timestamps for every entry. In this usecase all files are always empty. Here is simple performance comparison: list vs tree: cy6ergn0m@cgmachine /e4/sandbox/heap $ time cat ../x | grep ^610845$ ../x= 610845 cat ../x 0,00s user 0,00s system 2% cpu 0,127 total grep --color ^610845$ ../x 0,08s user 0,03s system 87% cpu 0,136 total cy6ergn0m@cgmachine /e4/sandbox/heap $ time stat 610845 =20 File: `610845' Size: 0 Blocks: 0 IO Block: 4096 =D0=BF=D1=83=D1= =81=D1=82=D0=BE=D0=B9 =D0=BE=D0=B1=D1=8B=D1=87=D0=BD=D1=8B=D0=B9 =D1=84=D0=B0=D0=B9=D0=BB Device: 804h/2052d Inode: 1520242 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 500/cy6ergn0m) Gid: ( 500/cy6ergn0m= ) Access: 2010-04-13 10:17:58.119477521 +0400 Modify: 2010-04-13 10:17:58.119477521 +0400 Change: 2010-04-13 10:17:58.119477521 +0400 stat 610845 0,00s user 0,00s system 75% cpu 0,005 total cy6ergn0m@cgmachine /e4/sandbox/heap $ I know that filesystems is not targeted for this usecase, but inodes limit looks strange.. why they are can't be allocated dinamically? Can I enlarge this limit on the fly? =20 --------------ms030603020202010904090806 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKcDCC BTQwggMcoAMCAQICAwhTxTANBgkqhkiG9w0BAQUFADB5MRAwDgYDVQQKEwdSb290IENBMR4w HAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNBIENlcnQgU2lnbmlu ZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRAY2FjZXJ0Lm9yZzAeFw0xMDAz MDgyMjMzMjdaFw0xMDA5MDQyMjMzMjdaMD4xGDAWBgNVBAMTD0NBY2VydCBXb1QgVXNlcjEi MCAGCSqGSIb3DQEJARYTY3k2ZXJHbjBtQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD ggEPADCCAQoCggEBAKl2G6TMtz2i5t40UoH8NB7kx5/x8ng5CHYiL3YYDnB/6CDEKpSrSujP kDkZhM3senhPNqN6WEwIOu+T1HWhatvIymxy6XxlnpOLzAZsdSslfX5klkjLKDrpqAPQ64fd /pR1GNKTNmJ9OwmnHkRaIx6pMt182kV3K6Isbfexa27DnDpYsN2W/Or7+ncGBRe4cPL5RuKa 0tHhlmxlaveK4kx3g5BvtUDbECd3vOI+jQe/nArlNUecKSihCPU58r7pdrIdNng1+R6vkvJy KSLF7uFStCvk1U+dgJHvjYrvbiQwCCu4WUS0bucpkwJtHDnJrwha1iuuFph3r4RK5pGJHp0C AwEAAaOB/zCB/DAMBgNVHRMBAf8EAjAAMFYGCWCGSAGG+EIBDQRJFkdUbyBnZXQgeW91ciBv d24gY2VydGlmaWNhdGUgZm9yIEZSRUUgaGVhZCBvdmVyIHRvIGh0dHA6Ly93d3cuQ0FjZXJ0 Lm9yZzBABgNVHSUEOTA3BggrBgEFBQcDBAYIKwYBBQUHAwIGCisGAQQBgjc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