Linux – Debian – kjournald eats up the CPU and shuts the web server

central-processing-unitdebianhard drivekjournaldlinux

The kjournald process starts sometimes on my Debian web server.

When I run top, the kjournald process eats up 100% of the CPU utilization.

After an hour that the process runs, my web server (apache) does not respond anything to requests (my site is down), but I can access SSH via putty (very slow though).

When I show uptime, I get this:

debian:/home/jonathan# uptime
 08:11:56 up 15:14,  1 user,  load average: 101.06, 50.67, 30.41

This happens like once a week or so. When this happens, I must reboot to take my server up to its normal state. When I input reboot command, the server just dont reboot and I don't know why. I must hard reboot with the front button, like in the "Windows 95" days!

Best Answer

Install iostat and monitor your I/O rates. kjournald is part of your filesystem and if the CPU usage is high it could mean that you have high filesystem activity. Most likely scenario is that you have high write operations and your hard drives are too slow. You will need to investigate what process is causing high I/O activity. Some tips :

  • Lsof and see what files are open and their sizes. Run this with watch to monitor changes.
  • run iotop
  • run iostat with

    iostat -kx 5 1000

    Read iostat manual and try to understand the values. Your service times should be low.

  • run vmstat to see if your system is swapping.

It could be that your filesystem is corrupt / damaged, run fschk. Or you drives could be failing, use smartctl to check.

Related Topic