Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: skyp on September 09, 2017, 12:31:56 PM

Title: how to format a partition to xfs on piCore-9.0.3?
Post by: skyp on September 09, 2017, 12:31:56 PM
Hi!

I'm quite new in linux and trying to format a partition on the SD card to xfs on my new Rpi3 B+.
I allready installed filesystems-4.9.22-piCore-v7.tcz but there's no mkfs.xfs, which other distros have so i don't know how to perfom a formatting. Could anyone help me?
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: gavinmc42 on September 09, 2017, 03:53:34 PM
I usually do all my SD card formating on another Linux Mint PC with a SD card reader and Gparted.
It comes from early days when my Pi's had no Internet connection so piCore could not update itself.
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: Juanito on September 10, 2017, 12:30:09 AM
You need xfsprogs, which is not in the piCore repos
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: Juanito on September 10, 2017, 05:05:30 AM
..but it is now - posted
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: skyp on September 10, 2017, 08:28:43 AM
Wow Juanito, thanks! :) Awesome!

I find at least 20 percent quicker to write an xfs partition on my SD card than ext3/4.... 
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: bmarkus on September 10, 2017, 09:08:19 AM
I find at least 20 percent quicker to write an xfs partition on my SD card than ext3/4....

Interesting point, thank you for bringing up the topic. I will take a look to see is it worth to change to xfs for mmcblk0p2.

How did you benchmark it?
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: skyp on September 11, 2017, 04:56:31 PM
I've done some tests. It's a cheap Kingstone 8GB micro SD. mmcblk0p3 is formatted to xfs. As you can see, the significant difference interrestingly appeares only in write times. It's a big savior to my project because I need to capture high rate audio streams to the card without overloads. This little boost helped me out...

Code: [Select]
tc@box:~$ sudo dd if=/dev/zero of=/mnt/mmcblk0p2/test bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (500.0MB) copied, 87.098434 seconds, 5.7MB/s
tc@box:~$ sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
3
tc@box:~$ sudo dd if=/dev/zero of=/mnt/mmcblk0p3/test bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (500.0MB) copied, 68.906372 seconds, 7.3MB/s
tc@box:~$ sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
3
tc@box:~$ sudo dd if=/mnt/mmcblk0p2/test of=/dev/null bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (500.0MB) copied, 24.768939 seconds, 20.2MB/s
tc@box:~$ sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
3
tc@box:~$ sudo dd if=/mnt/mmcblk0p3/test of=/dev/null bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (500.0MB) copied, 24.112068 seconds, 20.7MB/s

Btw I tested another even cheaper noname 2GB card with 3.6/4.4 MB/s results... 
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: bmarkus on September 11, 2017, 10:04:22 PM
Lets see my test result.

ext4 partition on SD card in RPi3 card slot:

Code: [Select]
# dd if=/dev/zero of=test bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 60.9158 s, 8.6 MB/s

xfs partition on SD card in RPi3 card slot:

Code: [Select]
# dd if=/dev/zero of=test bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 39.0545 s, 13.4 MB/s

RAM disk (root fs):

Code: [Select]
# dd if=/dev/zero of=test bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 1.95662 s, 268 MB/s

Now the interesting result, ext4 on SD card in USB external card reader:

Code: [Select]
# dd if=/dev/zero of=test bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 34.2842 s, 15.3 MB/s

A different SD card was used, but both cards has the same rating, Class 10. Ther must be some difference due to card differences but I think more is the poor performance of internal SD card handling.

And finally an USB stick with ext4:

Code: [Select]
# dd if=/dev/zero of=test bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 179.612 s, 2.9 MB/s


Result is interesting, but lets see a real life test, building xfsprogs on ext4 and xfs partition on the same card.

Code: [Select]
ext4: 8m 15s
xfs:  7m 36s

XFS benefits for write intensive applications, like databases under high load would be much higher. All together I'm considering to move to XFS as a default file system. Now only one test left. BTRFS  ;)
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: bmarkus on September 12, 2017, 03:03:00 AM
btrfs:

Code: [Select]
# dd if=/dev/zero of=test bs=512k count=1024
1024+0 records in
1024+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 35.761 s, 15.0 MB/s
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: bmarkus on September 12, 2017, 03:14:32 AM
xfstools build time on btrfs:

Code: [Select]
btrfs: 7m 30s
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: bmarkus on September 12, 2017, 03:58:19 AM
Apropó, most látom hogy mindketten budapestiek és UPC ügyfelek vagyunk :)
Title: Re: how to format a partition to xfs on piCore-9.0.3?
Post by: skyp on September 13, 2017, 04:22:53 AM
Ez így van!  ;) Nem is tudtam, hogy a piCore főhadiszállás itthon van :)! Bár a nevedből rájöhettem volna!  :o
Szép napot!  :)