1 Reply Latest reply: Dec 18, 2013 4:37 AM by Catch-22 RSS

    What is "Allow to overcommit ENOSPC reservations (speeds up a test from 45 minutes to 10 seconds) "

    ykoba883

      Does anyone know?

       

      Oracle Linux 6.3 Release Notes

      https://oss.oracle.com/ol6/docs/RELEASE-NOTES-U3-en.html

       

      ->  Features

           Btrfs bug fixes and performance improvements

            "Allow to overcommit ENOSPC reservations (speeds up a test from 45 minutes to 10 seconds) "

       

      I have 2 questions.

       

      1. How , When, this "(btrfs) overcommit" works?

       

          I guess , it is like a memory overcommit.

          Is this wrong?

       

      2. How can I see this?  ex) Using dd command?

       

          I tried to see this, using dd command. But, I cannot see this "overcommit"

       

       

      [root@ol63 ~]# uname -a

      Linux ol63 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat Jun 23 02:39:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

       

      [root@ol63 ~]# cat /etc/oracle-release

      Oracle Linux Server release 6.3

       

      [root@ol63 ~]# mkfs.btrfs /dev/sdb2

       

      WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL

      WARNING! - see http://btrfs.wiki.kernel.org before using

       

      SMALL VOLUME: forcing mixed metadata/data groups

      Created a data/metadata chunk of size 1638400

      fs created label (null) on /dev/sdb2

               nodesize 4096 leafsize 4096 sectorsize 4096 size 15.69MB

      Btrfs Btrfs v0.19

       

      [root@ol63 ~]# mount /dev/sdb2 /mnt/btrfs/

       

      [root@ol63 ~]# btrfs fi show /dev/sdb2

      Label: none  uuid: bb64a94f-757e-4290-b7dd-e6d996e124e9

               Total devices 1 FS bytes used 28.00KB

               devid    1 size 15.69MB used 7.12MB path /dev/sdb2

       

      Btrfs Btrfs v0.19

       

      [root@ol63 ~]# btrfs fi df /mnt/btrfs/

      System: total=4.00MB, used=8.00KB

      Data+Metadata: total=3.12MB, used=20.00KB

       

       

      [root@ol63 ~]# cd /mnt/btrfs/

      [root@ol63 btrfs]# pwd

      /mnt/btrfs

       

      [root@ol63 btrfs]# dd if=/dev/zero of=5M-file bs=1M count=5

      5+0 records in

      5+0 records out

      5242880 bytes (5.2 MB) copied, 0.0240144 s, 218 MB/s

       

      [root@ol63 btrfs]# sync

       

      [root@ol63 btrfs]# btrfs fi show /dev/sdb2

      Label: none  uuid: bb64a94f-757e-4290-b7dd-e6d996e124e9

               Total devices 1 FS bytes used 5.04MB

               devid    1 size 15.69MB used 15.69MB path /dev/sdb2

       

      Btrfs Btrfs v0.19

      [root@ol63 btrfs]#

       

      [root@ol63 btrfs]# btrfs fi df /mnt/btrfs/

      System: total=4.00MB, used=4.00KB

      Data+Metadata: total=11.69MB, used=5.03MB

       

      [root@ol63 btrfs]# df -hT

      Filesystem    Type    Size  Used Avail Use% Mounted on

      /dev/mapper/vg_ol63-lv_root

                     ext4     18G  2.3G   15G  14% /

      tmpfs        tmpfs    496M     0  496M   0% /dev/shm

      /dev/sda1     ext4    485M   54M  406M  12% /boot

      /dev/sdb2    btrfs     16M  5.1M  6.7M  44% /mnt/btrfs

       

      [root@ol63 btrfs]# dd if=/dev/zero of=10M-file bs=1M count=10

      dd: writing `10M-file': No space left on device

      2+0 records in

      1+0 records out

      1048576 bytes (1.0 MB) copied, 0.00684569 s, 153 MB/s

       

       

      [root@ol63 btrfs]# btrfs fi show /dev/sdb2

      Label: none  uuid: bb64a94f-757e-4290-b7dd-e6d996e124e9

               Total devices 1 FS bytes used 6.04MB

               devid    1 size 15.69MB used 15.69MB path /dev/sdb2

       

      Btrfs Btrfs v0.19

       

      [root@ol63 btrfs]# btrfs fi df /mnt/btrfs/

      System: total=4.00MB, used=4.00KB

      Data+Metadata: total=11.69MB, used=6.03MB

       

       

      [root@ol63 btrfs]# ls -alh

      total 6.1M

      dr-xr-xr-x. 1 root root   30 Dec 18 16:06 .

      drwxr-xr-x. 4 root root 4.0K Dec 13 12:06 ..

      -rw-r--r--. 1 root root 1.0M Dec 18 16:06 10M-file      

      -rw-r--r--. 1 root root 5.0M Dec 18 15:54 5M-file

       

      ############################################ 

        If 10M-file was created as size of 10MB ,

         I guess, it is "overcommit" . but, this is not.