WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to format a partition to xfs on piCore-9.0.3?  (Read 277 times)

Offline skyp

  • WikiUser
  • *
  • Posts: 11
how to format a partition to xfs on piCore-9.0.3?
« 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?
« Last Edit: September 09, 2017, 12:53:33 PM by Rich »

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 280
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #1 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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9452
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #2 on: September 10, 2017, 12:30:09 AM »
You need xfsprogs, which is not in the piCore repos

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9452
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #3 on: September 10, 2017, 05:05:30 AM »
..but it is now - posted

Offline skyp

  • WikiUser
  • *
  • Posts: 11
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #4 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.... 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6907
    • My Community Forum
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #5 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?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline skyp

  • WikiUser
  • *
  • Posts: 11
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #6 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... 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6907
    • My Community Forum
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #7 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  ;)
« Last Edit: September 11, 2017, 11:47:02 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6907
    • My Community Forum
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #8 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
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6907
    • My Community Forum
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #9 on: September 12, 2017, 03:14:32 AM »
xfstools build time on btrfs:

Code: [Select]
btrfs: 7m 30s
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6907
    • My Community Forum
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #10 on: September 12, 2017, 03:58:19 AM »
Apropó, most látom hogy mindketten budapestiek és UPC ügyfelek vagyunk :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline skyp

  • WikiUser
  • *
  • Posts: 11
Re: how to format a partition to xfs on piCore-9.0.3?
« Reply #11 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!  :)