[SOLVED][ext4]Tuning "bytes-per-inode ratio" ?

Hi,
I'd like to format two partitions (under LVM) with ext4, a / (20GB) and a /home (890GB). The usage pattern for the /home partition will be fairly standard (smalls documents, configuration files, a lot of media).
The wiki mentions something about tuning the "bytes-per-inode ratio" for partition of more than 750GB (https://wiki.archlinux.org/index.php/Ex … filesystem).
It does however not reference any links / documentation for it.
The mke2fs man page isn't any more helful toward offering pragmatic advice.
My question is the following : Should I bother tuning this option for /home (I'm assuming that the default is good enough for /, correct?) and if so, how (range of ratios from "conservative" to "probably too much") ?
Thank you for reading.
Last edited by Resistance (2015-05-10 14:48:19)

1) Removing reserved blocks can result in an immediate gain of up to 5% space (although reducing it to 0 is kind of risky if you plan on actually filling the drive).
2) The defaults for inode creation is 1 inode for every 16MB of data.  inodes occupy 256 bytes.  That means for every 16M of data you lose 256 bytes, or about 1.5%.  I've confirmed that to be the case using df and df -i  on drives of various sizes and doing the math. 
The thread linked above showed 22GB for a 1.5T drive which is roughly 1.5%. So you can reduce your inodes and maybe squeeze out another percent or so, but TMK you can't undo it without reformatting.  If you haven't removed reserved blocks yet, that's a more fruitful source of disk space.
EDIT: Sorry, didn't see your [SOLVED] post until after I posted.  Sounds like you made the right call.
Last edited by mwillems (2015-05-10 15:06:25)

Similar Messages

  • Total rowsize for table exceeds the maximum number of bytes per row (8060).

    I am trying to Creat a UserDefined Field in Marketig document OPOR Table through the script. then the warning  "Total rowsize for table exceeds the maximum number of bytes per row (8060). " is occuring ,and transcation rollback. how can i solve the problem.

    You have three ways to deal with this:
    1) make you user field smaller.
    2) check all other UDF in that table, and if you find one that your not using, delte it.
    3) Somebody told me that SQL Server 2005 will not have this problem. Maybe you can migrate.
    Best regards
    Harold Gómez V.

  • How to find no of bytes per character in a word - Urgent need

    Hi,
    I have some data in the database with chinese characters. I want to know how many bytes per each character in a word and get the total bytes.
    Is there any built in Oracle function or anything where i can get no of bytes for each character or a word.
    I am not able to find the solution anywhere.
    Any help is appreciated.

    Hi,
    You can use LENGHTB function.
    SQL>SELECT LENGTHB(dummy) FROM DUAL;
    LENGTHB(DUMMY)
                 1
    1 row selected.
    SQL>Regards

  • Databse of 1888 Byte Per Record with 259 Fixed Fields Stumped CR?!?

    My Database of  15 million records/rows at 1888 Byte Per Record with 259 Fixed Fields STUMPED CR?!
    Executive Summary :
    I have lots of data. There are 15 million of records in some of my database files. But I need to drill into the data and get counts for each field.
    I need to know how many times each data field (row) is populated in a database file. For example,  how many of my records have last name? how many have first name? date of birth? etc.  I need a simple report made using SAP "Crystal Reports 2011" Workstation type edition that SUMS each data  row into a single column output like csv.
    My database sizes can range from 1,000 to 18 million records that are in fixed field asci format with 1888 bytes and 256 rows per record!  The report  needs to SUM each data field or, in the case of a data field with a minimum of twelve tables, SUM each value of a table.
    My contracted CR programmer is an expert although she was new to data files this humongous. Can anyone here help us get CR to work on my data? Here was her conclusion, Crystal Reports Fail:
    My file is 14.1 gb  as well. However, when run through Crystal Reports, it
    only returns 2,274,876 records. Therefore, I am going to assume that there
    is a Record Limit for Text files of this. I searched through all the
    registry settings and there is nothing that appears to be limiting it. I
    went online for a while to see if there was any information on it, and just
    like when I used to work there, there was nothing concrete. Business Objects
    does not physically test this large of data retrieval, therefore they don't
    know the exact record limits.
    I'm not sure what to suggest, but I don't think Crystal Reports is going to
    work for you and I wouldn't have known that from the beginning without
    testing your data. I'm 99% sure there is a refund policy on the software, so
    you shouldn't have any issues returning it.
    Since I only specialize in Crystal Reports, I'm not sure what other software
    can handle this amount of data. Possibly Cognos, but you may want to find
    out from them or do some research.
    If your data were in a database that can run stored procedures (like SQL
    Server or Oracle) then you could write SQL to only return the counts. Then
    when Crystal connected to the stored procedure, it should work, but I can't
    say for sure without testing it. And I don't have SQL Server or Oracle
    installed on my machine. I believe MYSQL (the free version) has a limit to
    the number of records it can hold and I'm sure 8 million would be over the
    limit. Also, I'm not sure if it supports stored procedures. I have used it
    once before and found it extremely cumbersome and limited. I think SQL
    Server and Oracle are quite pricey, so I don't think that this will even be
    an option for you.

    Hi Shawn,
    I actually contacted the same person you did also. Summer was a Report Designer Resource here and knows her stuff and the Report Designer as much as our Developer who wrote it do.
    As I suggested in my first reply is to get all that data into a real database, one that can run Stored Procedures to do all the crunching unfortunately is the only way I can see this ever working.
    Windows 7 and 8 CPU's doesn't help, 64 bit may but the problem is CR Designer is a 32 bit application so it can't take advantage of the 64 bit memory addressing space.
    What you could so is post your question to the forum:
    [Business Decision Making with BI|Marketing Library;
    This is a forum for managers or anyone who wants to have a non-technical discussion about making informed decisions with analytics tools. Ask questions and share your experiences on how to effectively utilize data to address real business problems. Experts from inside and outside SAP will be monitoring these conversations and offering their knowledge along with the broader community.
    Someone in there may have another SAP product that might be able to load your flat file into a data tool that CR can report off of.
    I still think a copy of MS SQL 2008 Express is your best and likely cheapest solution and then you can simply import the data into it which it has an Import Wizard that makes it relatively easy to do... Although you may have to break your file into pieces for it to be able to process also.
    You need to be flexible on that data source, I doubt you'll find anything that can report off of that huge of text file.
    Good luck
    Don

  • Change bytes per sector windows server 2012

    Hi,
    We have installed windows server 2012 Datacenter Edition on
    Cisco UCS C24 M3 server. We need to install this with 4K bytes per sector and 4K bytes ber physical sector. When we specify the unit size while formatting it only changes the
    bytes per cluster.
    We have tried to change it with 8K & 64K but in OS it shows only in
    512 Bit per sector. I have tried to get hotfixes for the same but i didn't got it for server 2012.
    Please help me to resolve this.
    Balkrushna

    Have you looked at this:
    http://msdn.microsoft.com/en-us/library/windows/desktop/hh848035(v=vs.85).aspx

  • Get traffic statistics like tx/rx bytes per day of cellphone.

    One part of work with my Master Thesis , I have need to get traffic statistics like tx/rx bytes per day of cellphone.
    I had developed for Windows Mobile with C#, but now I wish to develope a generic solution and I think that Java is a great choice.
    Can anybody help to show me a better way to get this?
    Thanks for all in advance.
    Carlos
    [email protected]

    With J2me this is simply not possible.

  • Bytes per Second

    Dear Reader,
    I have made my simple download utility program in java.
    In there i can count the number of bytes downloaded.
    --Problem i am facing is to get bytes per second of the download in progress.
    For this purpose i take system time at definite intervals(one or two seconds) and count
    the bytes downloaded in that specific intervals.
    Doing so slows down the speed of the program(execution speed).
    If you have any alternative to get bytes per second which does not consume time please
    notify...
    Thank you

    Make sure you don't have a lot of System.out.prints when you calculate the speed, and instead of reading just one byte at the time, you could read x bytes at the time using a byte array.
    byte[] buffer = new byte[1024];
    long start = System.currentTimeMillis();
    long bytesRead = 0;
    int len;
    while (System.currentTimeMillis()-start < 2000 && (len = in.read(buffer)) != -1) {
      bytesRead += len;
      // ... do something with the read bytes.
      // Valid bytes are in the buffer from index 0 to len-1, the rest is garbage
    long rate = 1000*bytesRead/(System.currentTimeMillis()-start);
    System.out.println("Current rate is: "+rate);Something like that..

  • [Solved] ext4 partition reported as NTFS

    I was testing a SSD disk before installing and i plugged it to a Wndows machine for benchmarking purposes
    For performing such tests, I created 2 NTFS partitions.
    Afterwards, I plugged the disk to the SATA interface of the computer I would use it in.
    I formatted the two partitions that were in the disk.
    mkfs.ext4 /dev/sda1
    mkfs.ext4 /dev/sda2
    ...and got no errors...
    When I run fdisk -l I get:
    System: HPFS/NTFS/exFAT
    But if i run cfdisk, it's being reported as ext4 - same happens when i open gparted.....
    Why can this be?
    EDIT: Fixed changing the partition type to 83 from cfdisk (prior unmount)
    I didn't lose any data in the process....
    Last edited by Xi0N (2012-10-21 19:54:57)

    Glad to see you solved this yourself.  Please don't forget to mark the post as [Solved] and keep our forums organized (mostly).

  • Dynamic SQL and 255 bytes per line limit

    I would like to create a Dynamic SQL statement that is longer than 255 bytes. What do I need to do to embed a carriage return or something so that the resultant string is broken up into multiple lines?

    Please ignore. This was a stupid question!

  • [solved] Ext4 goes read-only after nodealloc

    Hello.
    I've been trying this many times, but never succeed with using my partitions powered by ext4 file system with nodealloc option in fstab. It doesn't matter, if I add this option after defaults or replace defaults with nodealloc only. After reboot, all ext4 partitions (/ and /home) goes read-only, so I can't do anything with Arch, not even change fstab back. There are no problems, if I put other options to fstab (for example: relatime to ext3 file systems).
    Anyone have same problem?
    Last edited by weakhead (2009-04-20 19:32:30)

    Whoa! That explains everything. I will try one more time.
    EDIT: Yeah, this is it. It's nodelalloc, not nodealloc...
    Thanks
    Last edited by weakhead (2009-04-20 19:32:13)

  • [SOLVED] mplayer not keeping mkv aspect ratios

    When playing MKVs which have Display Width/Height defined, it appears the Movie-Aspect is never being set. Here's sample console output:
    mplayer movie.mkv
    -snip-
    [mkv] |+ segment information...
    [mkv] | + timecode scale: 1000000
    [mkv] | + duration: 6894.848s
    [mkv] |+ segment tracks...
    [mkv] | + a track...
    [mkv] | + Track number: 1
    [mkv] | + Track type: Video
    [mkv] | + Default flag: 1
    [mkv] | + Codec ID: V_MPEG4/ISO/AVC
    [mkv] | + CodecPrivate, length 40
    [mkv] | + Default duration: 41.708ms ( = 23.976 fps)
    [mkv] | + Language: und
    [mkv] | + Name: -snip-
    [mkv] | + Video track
    [mkv] | + Pixel width: 704
    [mkv] | + Pixel height: 480
    [mkv] | + Display width: 852
    [mkv] | + Display height: 480
    -snip-
    Starting playback...
    Increasing filtered audio buffer size from 0 to 34816
    [h264 @ 0xe26f60]no picture
    [h264 @ 0xe26f60]no picture
    [ffmpeg] aspect_ratio: 0.000000
    VDec: vo config request - 704 x 480 (preferred colorspace: Planar YV12)
    Trying filter chain: ass vo
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined - no prescaling applied.
    VO Config (704x480->704x480,flags=0,'MPlayer',0x32315659)
    REQ: flags=0x437 req=0x0
    VO: [xv] 704x480 => 704x480 Planar YV12
    VO: Description: X11/Xv
    VO: Author: Gerd Knorr <[email protected]> and others
    Xvideo image format: 0x32595559 (YUY2) packed
    Xvideo image format: 0x32315659 (YV12) planar
    Xvideo image format: 0x59565955 (UYVY) packed
    Xvideo image format: 0x30323449 (I420) planar
    using Xvideo port 310 for hw scaling
    *** [ass] Exporting mp_image_t, 704x480x12bpp YUV planar, 506880 bytes
    *** [vo] Allocating mp_image_t, 704x480x12bpp YUV planar, 506880 bytes
    -snip-
    Any ideas as to what is happening? My ~/.mplayer/config contains the following:
    # Write your default config options here!
    [extension.mkv]
    demuxer=mkv
    sid=0
    ass=yes
    embeddedfonts=yes
    fontconfig=yes
    What gets me is that the Display Height and Display Width are clearly being detected by the demuxer--but it's as if that information isn't making it all the way down to when it starts playing. Thoughts?
    EDIT: I should also mention that without the demuxer being set to mkv, I still don't get the AR preserved.
    Last edited by skystrife (2010-11-08 23:45:20)

    There was a bug in mplayer for a short time. It's possible the current mplayer in Arch is exactly that buggy version. Try mplayer-svn from AUR.

  • [SOLVED] Cannot install python per instructions in Beginner's Guide.

    So, the overview:
    I just finished installing as per the Beginner's Guide and have logged in as root.
    I've enabled a couple mirrors in /etc/pacman.d/mirrorlist
    Doing NOTHING ELSE I run the following command: "pacman -Sy" python and the result:
    python package not found, searching for group...
    error: 'python': not found in sync db
    After that I tried another suggestion I saw here on the forum: pacman -Sy and then pacman -Syy
    Nothing. I thought maybe I botched something on the install, so I did it again. Same result. I cannot get pacman to install python (or ruby) or anything.
    What gives?
    Last edited by cult hero (2010-01-10 04:51:42)

    Yes. If no mirrors are uncommented a different error comes up. (no servers configured for repository)
    error: failed to syncronize any databases

  • [SOLVED] EXT4 Data Corruption Bug Linux 3.6.2 & 3.6.3

    Be careful
    EXT4 Data Corruption Bug Hits Stable Linux Kernels
    http://www.phoronix.com/scan.php?page=n … px=MTIxNDQ
    https://lkml.org/lkml/2012/10/23/779
    Edited: Removed the [ALERT]  label.
    Last edited by ontobelli (2012-11-01 04:58:43)

    headkase wrote:
    Even though it is a severe bug the chances of it happening to you are low.  You have to unmount and immediately remount an EXT4 partition twice in a row for it to happen.  On a normally operating system that is not a normal thing to happen.  Just wait on your desktop for 5 minutes before rebooting again.
    Arch, as a general rule, tends to stick as close to upstream as possible.  I'm sure the devs are very competent people but a quick hack or branch revert has the possibility of introducing issues of its own.  With the chance of the bug occurring low on a normally operating system I think it is better to wait for a fix from upstream.
    Well maybe i am a bit over stressed about this since with this computer i have quite a lot of troube which i cannot find solutions to. Also a kernel panic after a reboot this morning -probably not related to this- got me in a bad mood.
    Anyway.

  • [solved] ext4 removable media usable by anyone on any computer.

    Hi there !
    Is there something special to know about ext4 and extern USB hard drive ? I used Gnome DIsk Utility to format it, and when i plug it, it mounts ok but with root, so I can't write data on it. Is there a way to fix it please ?
    Last edited by talnotag (2010-07-28 01:10:45)

    karol wrote:
    talnotag wrote:I was thinking about that at the same moment, but will it bo ok for new files added in the future as well ?
    https://bbs.archlinux.org/viewtopic.php … 81#p799381
    In theory you could create all files with 777 permissions and mount the drive accordingly http://en.wikipedia.org/wiki/Umask
    Ok sounds good, I think it will be ok.
    Thanks a lot for your help ! I hope there will be a real free filesystem made for large removable device one day.

  • Set the max bytes per packet for an input stream

    Hi,
    I got this problem:
    I want to store some images into a DB. Now if the images are huge, the DB told me, that the packet size is too large
    maybe like that : 'Packet for query is too large (1668641 > 1048576)'
    I use an ByteArrayInputStream for the transmission to the DB.
    So if I am not able to set the max. packet size of the DB is it possible to cut the input stream into pieces to send them to the DB ?
    regards,
    Olek

    None of this makes any sense.
    The MySQL driver will be using TCP to talk to the database server. TCP is a stream oriented protocol. You can't control the size of the packets (other than the maximum by frigging with OS settings - don't do that). Neither can the server detect the sizes of incoming packets. It just sees a stream of bytes and has no idea where the write() boundries are or how the TCP protocol split that into IP packets - it's just a stream of bytes arriving in the same order they were sent.
    And... the max TCP segment size is nowhere near 32Mb, so that doesn't make any sense eeither.
    So, I conclude (especially in light of the answer about the config settings) that "packet" is a badly abused term by MySQL that allows it to limit the size of individual requests in order to provide some kind of protection against badly written clients and/or malicious attacks. If you need to send more data than this, just up the limit - especially if this is an intranet application where the client is under your control and attacks are unlikely.

Maybe you are looking for