-2

/var/www/website contains the files that powers a website, and /var/www/media contains many tiny media files like images in subdirectories named after their date of creation. Deleting/pruning an entire subdirectory of many tiny files hogs the IO and slows the server to a crawl for hours.

enter image description here

Problem: I believe disabling ext4 journaling can speed up the deletion, is that true?

If so, is it advisable for the main website files at /var/www/website to have journaling disabled as well, since they both reside in the same ext4 filesystem /dev/md4.

enter image description here

Nyxynyx
  • 1,459
  • 11
  • 39
  • 49
  • Why even configure a journalizing filesystem if you are just going to gut its primary feature. Try using ext2 if you want to run this way. I wish you luck and a lot of time waiting for fscks! – mdpc Mar 14 '13 at 02:29
  • It was the default filesystem that came with Ubuntu 12.04 which is being used for the web server. – Nyxynyx Mar 14 '13 at 02:31
  • I guess that is why one might not want to do a default installation. – mdpc Mar 14 '13 at 02:33
  • How about the `data=writeback` option instead of disabling journaling completely? I heard that ex4 without journaling is faster than ext2. – Nyxynyx Mar 14 '13 at 02:39
  • 1
    @mdpc, ext4 without journaling still has many advantages over ext2. – psusi Mar 14 '13 at 03:47
  • If it is possible in principle to change the FS then you should have a look at FS comparisons. Probably a different FS does this special task better than ext4. Or you make your own comparison. – Hauke Laging Mar 14 '13 at 19:25
  • Will eventually move the file storage to its own server, thats when I can use a different FS. Any recommendations? – Nyxynyx Mar 14 '13 at 19:37

1 Answers1

0

You can use tune2fs -O ^journal to remove the journal from the fs while it is unmounted, or mount it with the -o noload option to disable the journal ( temporary for the latter ), but this will make filesystem corruption more likely in the event of a crash or power fail, and at the least, will require a lengthy fsck after.

psusi
  • 3,347
  • 1
  • 17
  • 9