Filesystem Benchmarks

Choosing the type of filesystem that you want to use on your system can be tricky. Throughout the earlier sections of this chapter, we have explored the capabilities of various Linux filesystems and suggested the types of tasks that each is best suited to. However, nothing shows the performance of a filesystem better than benchmarks that you can run against each, and then simply compare the results. Various books and articles on Linux filesystems provide just this sort of comparison. Justin Piszcz, the author of one such article for the online Linux Gazette, kindly gave us permission to reproduce the benchmark results from his article. Figure 3-2 shows some of the more general benchmarks he ran that highlight some of the most important results. To see the full benchmark, you can view the full article at

http://linuxgazette.net/102/piszcz.html.

FILESYSTEM

EXT2

EXT3

JFS

Reiser

XFS

1 UNTAR KERNEL 2.4.26 TARBALL

24.49

31.73

34.64

12.36

23.79

2 TAR KERNEL 2.4.26 SOURCE TREE

17.86

23.4

27.06

22.81

24.85

3 REMOVE KERNEL 2.4.26 SOURCE TREE

4.24

7.26

10.86

3.18

4.48

4 COPY 2.4.26 TARBALL 10 TIMES

18.28

46.68

38.17

49.16

26.22

5 CREATE A 1GB FILE

18.93

22.35

28.87

25.8

20.49

6 COPY A 1GB FILE

45.04

62.48

54.46

71.06

55.89

7 CAT 1GB FILE TO DEV NULL

21.7

23.52

20.4

23.28

21.13

Figure 3-2: Benchmark results

The benchmarks represented in the graph are as follows:

1. Untar the kernel 2.4.26 kernel. This represents a large amount of small files being created on the filesystem.

2. Tar the same source tree. This shows a large amount of small files being queried and read.

3. Remove the kernel source tree. This represents a large amount of files being removed from the filesystem.

4. Copy the kernel tarball ten times. This represents the reading of a large file many times over and shows both filesystem performance and the performance of the read-ahead buffer.

5. Create a 1GB file. This shows how well the filesystem handles the creation of a large file. This is especially good at showing how well the filesystem deals with allocating a large amount of space over a large span of the disk.

6. Copy a 1GB file. This represents how well the filesystem deals with both reading and writing a large file. This is valuable for fileservers that have to deal with large files.

7. Stream data from a 1GB file to the null device. The null device is a black hole that is able to read in any data and drop it immediately. This represents how well the filesystem can read a file.

As you can see in the benchmarks, ReiserFS is very good at dealing with small file operations, whereas EXT2 is good at reading larger files. XFS copies large files sequentially very well (not as well as EXT2), whereas JFS proved the best at reading the 1 gigabyte file.

These tests are by no means conclusive but are here to give you an idea of how well the filesystems perform comparatively. Choosing among them is a matter of judging how data is manipulated on your system and how you see that changing in the future. For general information about the capabilities and design of each of the types of filesystems shown in Figure 3-2, see the section that introduces that filesystem earlier in this chapter.

Once a filesystem has been created, you will probably want to actually use it. The process is different from that of other operating systems, such as Windows, where all available filesystems are automatically loaded. In Unix, a filesystem has to be mounted by the operating system. Mounting is the process where the root of the filesystem is attached to your system's file hierarchy by associating it with a directory. This may seem like an archaic way of accessing your data, but it does provide you with a transparent way of accessing all the data (local and remote) under a single administrative domain.

The filesystems that you can access from a Linux system can be grouped into two general types — local and remote. Local filesystems are filesystems that are located on storage devices that are directly connected to a particular Linux system. Remote filesystems are those that are attached to other Linux systems but that you can access from your system by using a networked filesystem protocol such as the Network File System (NFS), which is the most common network filesystem on Linux and Unix systems.

Filesystems can be mounted either manually or automatically when your system boots. Mounting filesystems automatically is discussed later in this chapter, in the section "Automatically mounting filesystems" (oddly enough). Filesystems are mounted manually by using the mount command. The mount command attaches a filesystem to the filesystem hierarchy and allows you to pass parameters to the filesystem driver that specify how it should use the filesystem. Issuing the mount command with no arguments lists all of the filesystems that are currently mounted on your system, as shown in Listing 3-10.

Was this article helpful?

0 0

Post a comment