📜 ⬆️ ⬇️

Using MySQL as a file system

Continuing this topic I want to return to the issue of the file database.

Interestingly, the files in the database are stored repeating the structure of a classical FS: the files are divided into blocks of 4 KB in size, which are stored in separate “blob” records. In total there are 3 tables of MyISAM type: tree (file system tree and file names), inodes (access rights and file parameters) and data_blocks (data blocks).


')
As an experiment, a 44 MByte Linux kernel source archive was copied to MySQLfs, the copy operation took 20 seconds, which is exactly 10 times more than when copying in a classic file system.

MySQLfs can be used, for example, to organize the simplest, small (that fits in the MySQL cache), distributed on several storage machines, not demanding to the speed of writing operations.

MySQLfs development team plans to write the FSCK utility to clean the database of deleted and lost (data block without an inode link) files, develop buffering and caching mechanisms, create a working system privileges and access control lists.

Perhaps the development has dubious prospects, but the project is interesting and I think it is worth trying and testing the performance.

Original

Source: https://habr.com/ru/post/20361/


All Articles