I'm going to move journal to another partition, but I don't know how to correctly caculate the size needed for journal?
ext4 file system with 15GB capacity.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
$ 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).
man tune2fs flashes
-J size=journal-size optiion. Another utility
dumpe2fs allows you to know for sure every specific case.