JuiceFS v0.16 is released, supporting TiKV metadata engine!

2021-08-18
Juicedata

After a month of development, JuiceFS brings the first new version v0.16 in the fall of 2021. This update involves 11 changes, fixes 16 bugs, and adds 6 new features.

With the eager anticipation of community users, JucieFS officially opened TiKV database as a metadata engine support.

It is worth mentioning that the implementation of TiKV as a metadata engine is derived from the PingCAP 2rd Hacking Camp activity. In more than a month, the JuiceFS team worked closely with community users to successfully implement support for the TiKV database.

TiKV Metadata Engine

TiKV is a key-value database that supports distributed transactions. Compared with Redis, it has more ideal reliability and horizontal expansion capabilities. Compared with ordinary SQL databases, it can provide more reliability on the basis of higher reliability. Excellent performance. TiKV is a good new choice for JuiceFS metadata engine.

Using the TiKV metadata engine, JuiceFS can provide tens of billions of file sizes and EB-level data storage capabilities.

Using TiKV as the metadata engine of JuiceFS is very simple. You only need to specify the PD address of the TiKV cluster when formatting the file system. The format is as follows:

tikv://<pd_addr>[,<pd_addr>...]/<prefix>

For example:

$ juicefs format \
    --storage minio \
    --bucket http://127.0.0.1:9000/mystor \
    --access-key minioadmin \
    --secret-key minioadmin \
    tikv://127.0.0.1:2379/mystor \
    mystor

The above command creates a file system named mystor. Please pay attention to the second-to-last line of the database. When specifying the PD server address, use the tikv:// protocol. The last /mystor of the address is an optional prefix, when multiple file systems or applications use the same TiKV cluster, setting the prefix can avoid confusion and conflicts.

Then, use the following command to mount the file system:

$ sudo juicefs mount -d tikv://127.0.0.1:2379/mystor ~/jfs

In terms of performance, we tested the performance of Redis, MySQL, and TiKV as metadata engines in the same computing environment using the benchmark tool included with the Golang. The results obtained are as follows.

Result description:

  • In the test environment, both Redis and MySQL are stand-alone versions, and TiKV uses a three-copy distributed architecture.
  • The value of the result represents the operation time, the unit is (microseconds per operation), the smaller the value, the better.
  • The numbers in parentheses are the ratios to the Redis-Always mode.

Even if TiKV adopts a multi-copy architecture, its performance in conventional file system operations is still better than that of the MySQL database. Compared with Redis full-memory storage, although there is an average performance gap of about 2~3 times, this is only a gap in pure metadata operations. In terms of data storage, the latency of object storage will account for a larger proportion, so In actual business scenarios, the performance gap between TiKV and Redis will be much smaller, and reliability and scalability will further highlight the advantages of TiKV.

Added stats command

This version also adds the stats subcommand to view the running status of the file system in real time.

This command displays the host resources consumed by the file system, FUSE operations, metadata, block cache, object storage bandwidth and other information in columns, and prints one line per second by default. You can view more through juicefs stats --help. The stats command can customize the information items to be displayed and the printing interval by matching the corresponding options.

The stats command interface was inspired by dstat, thanks to the author! 🍻

Added .config virtual file

The new version adds a virtual file named .config in the root directory of the mount point, which makes it easy to view the detailed configuration information of the file system.

$ sudo cat ~/mnt/.config
{
 "Meta": {
  "Strict": true,
  "Retries": 10,
  "CaseInsensi": false,
  "ReadOnly": false,
  "OpenCache": 0,
  "MountPoint": "mnt",
  "Subdir": ""
 },
 "Format": {
  "Name": "herald-jfs",
  "UUID": "a703ea9f-b70d-41b0-8fe6-ab44cbe8d734",
  "Storage": "minio",
  "Bucket": "http://127.0.0.1:9000/herald",
  "AccessKey": "minioadmin",
  "SecretKey": "removed",
  "BlockSize": 4096,
  "Compression": "none",
  "Shards": 0,
  "Partitions": 0,
  "Capacity": 0,
  "Inodes": 0
 },
 "Chunk": {
  "CacheDir": "/var/jfsCache/a703ea9f-b70d-41b0-8fe6-ab44cbe8d734",
  "CacheMode": 384,
  "CacheSize": 1024,
  "FreeSpace": 0.1,
  "AutoCreate": true,
  "Compress": "none",
  "MaxUpload": 20,
  "Writeback": false,
  "Partitions": 0,
  "BlockSize": 4194304,
  "GetTimeout": 60000000000,
  "PutTimeout": 60000000000,
  "CacheFullBlock": true,
  "BufferSize": 314572800,
  "Readahead": 0,
  "Prefetch": 1
 },
 "Version": "0.16.1 (2021-08-16 2edcfc0)",
 "Mountpoint": "mnt"
}

Add progress bar for gc and fsck

The gc and fsck commands have added a progress bar, which makes the operation progress more intuitive. Thanks to the community developer @zhijian-pro for his contribution to this feature.

Starting from v0.16, the meaning of the password in the Redis Sentinel URI has changed, from the password of Sentinel to the password of Redis Server. If Sentinel also sets a password, it needs to be specified by the environment variable SENTINEL_PASSWORD.

Other changes

  • Support upload/download bandwidth limit
  • Updatedb disabled

For more information about JuiceFS v0.16, please visit the GitHub repository View Details.

Open Source Contribution Guide

JuiceFS is an open source project under the AGPLv3, and its development is inseparable from everyone's support. An article, a page of documentation, an idea, a suggestion, a report, or a bug fix, no matter how big or small the contribution is, it is the driving force to promote the progress of an open source project.

Things you can do for the community:

We sincerely invite everyone who loves open source to join our community, let us make JuiceFS better together!

Related Posts

How a Distributed File System in Go Reduced Memory Usage by 90%

2024-02-22
Learn JuiceFS Enterprise Edition’s metadata engine design and optimization methods that reduced its…

Building an Easy-to-Operate AI Training Platform: Storage Selection and Best Practices

2023-12-14
Explore SmartMore's journey in building an efficient AI training platform with insights into storag…

Costs Cut & Ops Efficiency Boosted: Switching to a Big Data Storage-Compute Decoupled Architecture

2023-09-28
DMALL, Asia's leading omnichannel digital retail solution provider, switched from a storage-compute…

JuiceFS 1.1: Easier Cloud Storage for Billions of Files

2023-09-07
JuiceFS 1.1 is released, with improved stability, usability, security, features, and performance to…