1

I'm going to move journal to another partition, but I don't know how to correctly caculate the size needed for journal?

I'm running ext4 file system with 15GB capacity.

4
$ man mkfs.ext4
The size of the  journal must be at least 1024 filesystem blocks (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)  and may be no more than 102,400 filesystem blocks.

I think the default size is 128MB but not sure, that might be dated. Anyways I don't think moving journal to another partition on the same HDD will be an improvement. If you move to another physical disk that can help.

The best you can do is to try different sizes and compare to current state with your real workload (not some benchmark tool that may or may not simulate operations similar to your real workload).

  • Yeah , maximum 102400 * 4K / 1024 = 400 M , i was never expecting such thing in the manual , thanks ! – daisy Jun 15 '12 at 11:49
  • Optimal journal size highly depends on the data=mode you're using. While 128 MB makes it for ordered and writeback, best performances will happen with 1 GB and journal according to this documented study (ext3 though) Analyzing the Performance of an Externally Journaled Filesystem – tuk0z May 1 '16 at 20:13
1

man tune2fs flashes -J size=journal-size optiion. Another utility dumpe2fs allows you to know for sure every specific case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.