100% found this document useful (4 votes)
624 views

FS Ubuntu

The document discusses various Linux filesystems and benchmarks their performance. It compares EXT3, ReiserFS, JFS, and XFS based on metrics like capacity usage, mount speed, file copy/delete speed, and CPU usage. Cramfs and Squashfs are also evaluated as embedded filesystems, with Cramfs showing faster mount times but being read-only. Various techniques for optimizing boot times are outlined, such as parallelizing services, reducing scripts, and delaying unnecessary processes.

Uploaded by

anon-631335
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
624 views

FS Ubuntu

The document discusses various Linux filesystems and benchmarks their performance. It compares EXT3, ReiserFS, JFS, and XFS based on metrics like capacity usage, mount speed, file copy/delete speed, and CPU usage. Cramfs and Squashfs are also evaluated as embedded filesystems, with Cramfs showing faster mount times but being read-only. Various techniques for optimizing boot times are outlined, such as parallelizing services, reducing scripts, and delaying unnecessary processes.

Uploaded by

anon-631335
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Filesystem Review

With boottime reduction in the latter part

Mainstream Filesystem

EXT2
• Crashing between writing file contents and file meta-data may cause
inconsistency of file system, not robust.

EXT3
• Add log function to EXT2
• Still not support capacity compression, space using rate is also low.

ReiserFS
• Logging file system, introduce binary tree structure, faster and high efficiency
in space utilization.
• Incompatible between versions, and doesn’t support long file name (longer
than 768).

JFS
• IBM open source FS, reliable, fast and easy to use, introduce asynchronous
logging instead of logging system.
• Performance not high due to log data writing.

XFS
• Support huge file and directory, excellent I/O, support RAID and LVM.
• Complicate, hard in using.

Benchmark Test

Test settings
    * Hardware Processor : Intel Celeron 533
    * RAM : 512MB RAM PC100
    * Motherboard : ASUS P2B
    * Hard drive : WD Caviar SE 160GB (EIDE 100, 7200 RPM, 8MB Cache)
    * Controller : ATA/133 PCI (Silicon Image)
    * OS Debian Etch (kernel 2.6.15), distribution upgraded on April 18, 2006
    * All optional daemons killed (cron,ssh,saMBa,etc.)
    * Filesystems Ext3 (e2fsprogs 1.38)
    * ReiserFS (reiserfsprogs 1.3.6.19)
    * JFS (jfsutils 1.1.8)
    * XFS (xfsprogs 2.7.14)
Description of selected tasks
    * Operations on a large file (ISO image, 700MB) Copy ISO from a second disk
to the test disk
    * Recopy ISO in another location on the test disk
    * Remove both copies of ISO
    * Operations on a file tree (7500 files, 900 directories, 1.9GB) Copy file tree
from a second disk to the test disk
    * Recopy file tree in another location on the test disk
    * Remove both copies of file tree
    * Operations into the file tree List recursively all contents of the file tree and
save it on the test disk
    * Find files matching a specific wildcard into the file tree
    * Operations on the file system Creation of the filesystem (mkfs) (all FS were
created with default values)
    * Mount filesystem
    * Umount filesystem

The sequence of 11 tasks (from creation of FS to umounting FS) was run as a


Bash script which was completed three times (the average is reported). Each
sequence takes about 7 min. Time to complete task (in secs), percentage of CPU
dedicated to task and number of major/minor page faults during task were
computed by the GNU time utility (version 1.7).

Result
Filesystem Capacity Mount File copy File delete CPU rate File
usage(%) speed(sec) (700M) (700M) (%) Finding
(sec) (sec) (sec)
EXT3 92.77 0.2 38.2 32.5 ~10 4.6
Reiser FS 99.83 2.3 41.8 1.5 ~49 0.8
JFS 99.82 0.2 35.1 0.02 ~10 5
XFS 99.95 0.5 34.8 0.02 ~10 2.8

Other Embedded Filesystem

Comparison
filesystem compress MTD/block writable XIP in-kernel
CRAMFS Y block N N Y
JFFS2 Y MTD Y N Y
YAFFS2 N MTD Y N N
SQUASHFS Y block N N N
LOGFS Y MTD Y N soon
UBIFS Y MTD Y N soon
XIP Y MTD/block N N Y
CRAMFS
AXFS MTD Y N
Note
XIP: execute in place(need no transferring from flash to RAM).
So far SplashTop only support block devices, so we focus on cramfs VS squashfs.
CRAMFS
• File sizes are limited to less than 16MB, maximum filesystem size is a
little over 256MB.
• Read only filesystem.
• Read faster than JFFS2°Cloop.
• Compressing rate larger than 50°.
• Make cramfs:
#mkcramfs /lib lib.cramfs
#mkcramfs /usr usr.cramfs
• Mount cramfs:
#mount –t cramfs lib.cramfs /lib –o loop
#mount –t cramfs usr.cramfs /usr –o loop

Mount Test
Under SplashTop
Test A: mount -t squashfs bs-kde-3.1-dvm-0.2.0.6487.sq /mnt/sq
Test B: mount -o loop -t cramfs cr-kde.cramfs /mnt/cram

Test Result
Mount 1st(sec) 2nd(sec) 3rd(sec) 4th(sec) 5th(sec) 6th(sec) AVG
FS
Cramfs 0. 0. 0. 0. 0. 0. 0.007460432
011893353 005069195 005126116 01269708 004836625 005140224

Squash 0. 0. 0. 0. 0. 0. 0.008707174
022525168 004945227 005091264 00552428 004885443 009271663

Cromfs
• Efficient with gigabytes of large files having lots of redundancy.
• Filesystem is write-once, read-only. It is not possible to append to a
previously-created filesystem, nor it is to mount it read-write.
• cromfs and mkcromfs are slower than their peers.
So cromfs seems not a suitable one for us too.

Mount

Mount filesystem rough


A superblock object is created and initialized via the alloc_super() function.
When mounted, a filesystem invokes this function, reads its superblock off of the
disk, and fills in its superblock object.
Procedure
mount -> sys_mount ° do_mount -> do_kernel_mount -> alloc_vfsmnt & get_sb
(alloc and fill super block) ° sp->s_op->read and other operations.

Boot time boost

• Do it faster
• Do it in parallel
• Do it later
• Don't do it at all

Optimize RC Scripts
Follow the rules listed below to reduce execution time for the init scripts:
• Do not use unnecessary codes in the scripts.
• Replace external commands and utilities with the BusyBox built-ins as far
as possible.
• Do not use the piped commands as far as possible.
• Reduce the number of commands within a pipe.
• Do not use the back-quoted commands as far as possible.
The main goal of such optimization is to reduce the number of the "fork/exec"
calls during a script execution.

Details can be accessed from


http://elinux.org/Boot-up_Time_Reduction_Howto

Reference
http://www.host01.com/article/server/00070002/0621409102718620.htm

Linux°°°°°°(ext3,ReiserFS,jfs,xfs)°°°
http://hi.baidu.com/xuzhi1977/blog/item/c5869758dfafbade9d82040a%2Ehtml

http://man.ddvip.com/linux/Mandrakelinuxref/ch09s01.html

°Debian°°°XFS°°°°
http://blog.csdn.net/leo_cao/archive/2007/11/03/1864996.aspx
Filesystems (ext3, reiser, xfs, jfs) comparison on Debian Etch
http://www.debian-administration.org/articles/388

°°°°°°°°XFS-
http://bingel.blogdriver.com/bingel/1237904.html

Linux: SquashFS 2.1, Compressed Read Only Filesystem


http://kerneltrap.org/node/4410

Linux flash °°°°°°


http://www.ibm.com/developerworks/cn/linux/l-flash-filesystems/index.html

Logfs
http://www.logfs.org/logfs/

UBI filesystem
http://www.linux-mtd.infradead.org/doc/ubifs.html
http://lwn.net/Articles/275706/

°°°Linux°°°°°°°°°°°°
http://www.gd-emb.org/detail/id-50424.html
Linux °°°°°°°°
http://apt.nc.hcc.edu.tw/pub/mirror/ckhung_wp/b/sa/filesystem.shtml

°° data page ° Copy-on-Write/XIPs


http://blog.linux.org.tw/~jserv/archives/001821.html

Why ZFS (Zettabyte File System)?


http://blog.linuxoss.com/2008/07/why-zfs-zettabyte-file-system/

Cromfs: Compressed ROM filesystem for Linux (user-space)


http://bisqwit.iki.fi/source/cromfs.html#concept_datalocator

Benchmarking Filesystems Part II


http://linuxgazette.net/122/TWDT.html#piszcz

SquashFsComparisons
http://tree.celinuxforum.org/CelfPubWiki/SquashFsComparisons

Squashfs LZMA
http://www.squashfs-lzma.org/

Linux Kernel Development (2nd Edition)

Boot Linux faster


Parallelize Linux system services to improve boot speed
http://www.ibm.com/developerworks/linux/library/l-boot.html?ca=dgr-
lnxw04BootFaster

Reducing OS Boot Times for In-Car Computer Applications, Part III


http://www.linuxjournal.com/article/7857
"Reducing OS Boot Times for In-Car Computer Applications, Part II"
"Reducing OS Boot Times for In-Car Computer Applications, Part I"

Boot Times
http://elinux.
org/Boot_Time#Technologies_and_Techniques_for_Reducing_Boot_Time

Boot-up Time Reduction Howto


http://elinux.org/Boot-up_Time_Reduction_Howto

You might also like