From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D465D15ACFB for ; Wed, 19 Apr 2023 22:14:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 985ACE0875; Wed, 19 Apr 2023 22:14:05 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 040AEE0857 for ; Wed, 19 Apr 2023 22:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1681942436; i=warp_7@gmx.de; bh=yQpvw8YqP8DsVJAqcXQ5j83QpsfcPNwvnNLgoYXcC5k=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=p4FZkcMwqRAKuxcSJF3wKOhpDjuNs/oC5ZPpM3tMd50qiDv9zrq2nDqCqzTWJ31Qb TL2+rfjuQwzdgRePBwnb+ZUfbSPwEL1ySy7PPVHd+0zHp4ChJGMTYvP3KlfTvBTFA9 1Gxp6wqllXqhI1LjNWqtIrKYMuIriFsVXfJ2FZl26mT+LVpKesDmH4F6Dq13M6rT3q 3pbp0i+07unqh4L/MhNUGwChbh4jInH/LYhBfNtRyCUXf1q5mjPHhDI6ac5rk7tsKQ Nx7otN83dCudiApvKb2dsoYSsQLYiMzopYpoBDup/07J4xiU61vN2Om76IsRCxVp6g GJXVJw9Pr825A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from moby ([92.117.55.56]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M8ygY-1pvJo20Eek-0068Eq for ; Thu, 20 Apr 2023 00:13:56 +0200 Date: Thu, 20 Apr 2023 00:13:54 +0200 From: Frank Steinmetzger To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on Message-ID: Mail-Followup-To: gentoo-user@lists.gentoo.org References: <3a8a143d-38f0-b7ea-4aa1-10c0b3a2a1e0@gmail.com> <81fde7b8-cc55-fcae-79ea-4dd2a78eb8a0@gmail.com> <2703063.mvXUDI8C0e@wstn> <7ef36857-192e-6d2c-dc44-a2c4ba772205@gmail.com> <35474652-f973-75b2-b8e7-4d22915672ac@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gvgqRpa3AAnc61Pv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt 2.2.10; VIM - Vi IMproved 9.0 X-Provags-ID: V03:K1:30ih8EjHlMmyt05o1akzlQYZYlvA3K2n3lpKb+9CY42cQUSBiq3 eZxVQXDPUe1NPI/7r8cXjWfVwCgS80WMbemceVPUr+BA3nfRBuPjNBc0mNF3mLMVHGagZoC ObgeqLyKgBCK/Xvi2goXYqAqCAUa1CPVLH7/SaL7dTPAPu0NE14yBnKf33RRR8JdONPw+c2 N0deVbSVGPC72T7aXsrgg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:tHt2vWGpRj8=;SPWDdnLHAu07DpAFJSA0RbYNYUA a8BR3osefkJRgUB0Pg9r7t7TfSzkTi2PkC7qmuE1mcGoNpYnrARsqrYRfqCOZ/IZjBKS/vWih IbYulR85XiE9vp+oQ509Fp/RKbJBGZUfkNlahlY1Stjlp+4f/fmV3RI7OuCZNlejw9OcNxy4L KTn6Np4L2iDxnudhmyo75bFH3lDZAfGaQ1sU5xOHNa6g5fAbKtKV4ZI9pPgIJkEFVjCJMInP3 RutZQgRxB6kvS/XaO+bW/U9+BhqJwrsVGRYVZh+1Cd8RVHCWaPZvC6gHnyUaZilRyTV4mt6iF UknOOCm4vUJBuoOzfLGatvDEeit0hqAoBMrCFD5UQl36re/vou1lSvLNQTxB5ZPNbnPkWJ9wk dlrjAq6pRrL52X+Tc1o1GNYyo1V+LIPcf5CDzVmvWyaZQwLP+GvgTmpOupqzivlPEtrkhsJ3g DSOsWjRpDgavaUGeRiHT0jzOIYAdDjGMm+kx6XSmU9ZNho1tAUWh44u3VZtiB+nIyJjgkM84w crhsCtsPUZonRM8+l5RxBh4L4QrgTNjC60GAMhJNOQazJGzFhgCNdeo1GQREGWgtFbW7w5Qaq nGKz00VvVBaKgdf26+rLwt0GB3zrRPPZ+2M+MPHhd5wVFBR2xhOCZUeg9j4e4V3CmVo9LCMBQ oWn42uqvCRUExqBzYt246nISnC8897jLCoiSWEEpGOLd29G2wKFzAVsTA9Md0at000Bprdenk nR/I6EFGLESksg0RRaGDjeBYkKvhT2S6DqUKkF86uiRJEejJ90zVQFsIBumxBgFqrpsI4eVqT /4w3EVYVkxIjp7yayRSbvkzxfRSW7tYjXS/w3HKZ4D57ehkuqGLTBYMgY76o6GPmToVMQDA7p RaCjQgGyvYmZHRVAjMf052LkN6HjojrOb2EY/o7dG4SyGLJ2+3fXpvp3cHmUO7iKL1agf2aDr fdQgDw== X-Archives-Salt: 0b2e0009-028a-4a09-97aa-5908b9e4ae55 X-Archives-Hash: 433aa6eff6aff4323f2bf66aaf6b0bac --gvgqRpa3AAnc61Pv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am Wed, Apr 19, 2023 at 01:00:33PM -0700 schrieb Mark Knecht: > I think technically they default to the physical block size internally > and the earlier ones, attempting to be more compatible with HDDs, > had 4K blocks. Some of the newer chips now have 16K blocks but > still support 512B Logical Block Addressing. >=20 > All of these devices are essentially small computers. They have internal > controllers, DRAM caches usually in the 1-2GB sort of range but getting > larger. Actually, cheap(er) SSDs don=E2=80=99t have an own DRAM, but rely on the ho= st for=20 this. There is an ongoing debate in tech forums whether that is a bad thing= =20 or not. A RAM cache can help optimise writes by caching many small writes= =20 and aggregating them into larger blocks. > The bus speeds they quote is because data is moving for the most > part in and out of cache in the drive. Are you talking about the pseudo SLC cache? Because AFAIK the DRAM cache ha= s=20 no influence on read performance. > What I know I'm not sure about is how inodes factor into this. >=20 > For instance: >=20 > mark@science2:~$ ls -i > 35790149 000_NOT_BACKED_UP > 33320794 All_Files.txt > 33337840 All_Sizes_2.txt > 33337952 All_Sizes.txt > 33329818 All_Sorted.txt > 33306743 ardour_deps_install.sh > 33309917 ardour_deps_remove.sh > 33557560 Arena_Chess > 33423859 Astro_Data > 33560973 Astronomy > 33423886 Astro_science > 33307443 'Backup codes - Login.gov.pdf' > 33329080 basic-install.sh > 33558634 bin > 33561132 biosim4_functions.txt > 33316157 Boot_Config.txt > 33560975 Builder > 33338822 CFL_88_F_Bright_Syn.xsc >=20 > If the inodes are on the disk then how are they > stored? Does a single inode occupy a physical > block? A 512 byte LBA? Something else? man mkfs.ext4 says: [=E2=80=A6] the default inode size is 256 bytes for most file systems, exce= pt for=20 small file systems where the inode size will be 128 bytes. [=E2=80=A6] And if a file is small enough, it can actually fit inside the inode itself,= =20 saving the expense of another FS sector. When formatting file systems, I usually lower the number of inodes from the= =20 default value to gain storage space. The default is one inode per 16 kB of= =20 FS size, which gives you 60 million inodes per TB. In practice, even one=20 million per TB would be overkill in a use case like Dale=E2=80=99s media st= orage.=C2=B9=20 Removing 59 million inodes =C3=97 256 bytes =E2=89=88 15 GB of net space fo= r each TB, not=20 counting extra control metadata and ext4 redundancies. The defaults are set in /etc/mke2fs.conf. It also contains some alternative= =20 values of bytes-per-inode for certain usage types. The type largefile=20 allocates one inode per 1 MB, giving you 1 million inodes per TB of space.= =20 Since ext4 is much more efficient with inodes than ext3, it is even content= =20 with 4 MB per inode (type largefile4), giving you 250 k inodes per TB. For root partitions, I tend to allocate 1 million inodes, maybe some more= =20 for a full Gentoo-based desktop due to the portage tree=E2=80=99s sheer num= ber of=20 small files. My Surface Go=E2=80=99s root (Arch linux, KDE and some texlive= ) uses=20 500 k right now. =C2=B9 Assuming one inode equals one directory or unfragmented file on ext4. I=E2=80=99m not sure what the allocation size limit for one inode is, but i= t is=20 *very* large. Ext3 had a rather low limit, which is why it was so slow with= =20 big files. But that was one of the big improvements in ext4=E2=80=99s exten= ded=20 inodes, at the cost of double inode size to house the required metadata. --=20 Gr=C3=BC=C3=9Fe | Greetings | Qapla=E2=80=99 Please do not share anything from, with or about me on any social network. FINE: Tax for doing wrong. TAX: Fine for doing fine. --gvgqRpa3AAnc61Pv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmRAZ58ACgkQizG+tUDU MMpLRRAAwNRWIeUEQwb061jgRLS/lQdjlq9Gd+A8mxFAQ2dwPH3LN2MG53H8JOtk VvlXBQKiLEp1JSfL+fsAmW4SOEhDk7vgGoXRsGU6JaYGnAQPiFjxxG82RvW5/mYU O27i3sDcV0I8AbbMWKO3n2PX76FC5AOko3X0/jTRRtqCknieVuj1II0Kr6C6gd8R huXjjvh1+Aft9np0JmmvHBWwZv9kP/75wN078rP96TIQvlR80+zvTFOHcdXI3oCC 2LOER7Ht9MMZTkNUThuVz/zj1/H+/CwcHlPEDJ2mL1sebtnFQwvzaE+1N7LSvVjH 88KP+p1hewZjCSYpcFSv4jVouFo/B0ae+MP3JUm1NVBbRm4Wrc+5Gy89cDLa06SV 8L0cg8O7BOlDO5Wpy7bu8znNyRqGV3bt8uLo537YMNAt2/tdAsBE6hIMetMnEcPi KPbBwhNRDM8dWVeoijsVKI5ctAYwB7oTfCz8TUGaxT86JaMJXxACiY7n6IqGNJay lwOE//lx0PllgCLYkOkyizXQd9S64FOut+CsDBtZUJ/VbdSUPg/evEW2gnWHFKa4 ShqG949HZCS0Ms4kfBdYCsXc71cyCiPOzftr4H5MXvdSD6B2Cn4meg9Ki4MzuUN9 R6yEtwBnQ5w062UPIleZVDqbt0dfJMPDS7pfgtj9hFiyuu9DJ+4= =G1Vz -----END PGP SIGNATURE----- --gvgqRpa3AAnc61Pv--