Results 1 to 8 of 8

Thread: 12.04 - kjournald keeping my harddrive busy

  1. #1
    Join Date
    Jun 2005
    Location
    de.munich
    Beans
    186
    Distro
    Ubuntu 12.04 Precise Pangolin

    12.04 - kjournald keeping my harddrive busy

    How can I reduce journal writes?

    I am wondering if anyone experiencing disk activities like myself.

    Using desktop AMD64. A pretty basic installation Samba, ntp, Unity desktop.

    Discovered while using ext4 that ext4lazyinit caused this continously writing. So

    I tried ext3 filesystem instead as it was used in the past. But again harddrive under ext3 is permanently accessed. This time it is kjournald.
    Last edited by lptr; July 17th, 2012 at 05:53 AM.

  2. #2
    Join Date
    Jun 2005
    Location
    de.munich
    Beans
    186
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Re: 12.04 - kjournald keeping my harddrive busy

    [update]
    Found here (sorry for this is German language)
    http://www.fukurama.org/wordpress/20...tu-minimieren/
    a guy who researched this phenomen as he runs Ubuntu for a home system. He wrote some scripts trying to pump out things onto ramdisk and to bulk write out very seldom as he wants to leave his SSD harddrive sleeping as long as possible.

    He went away from using ext4 and even ext3. He says that any access occurs only on system partition not into home.

    Is there any filesystem specialist here, who can explain what happens in using journal fs and if in ext3/4 this refresh interval can be made longer? Or is this a kernel parameter that cannot be modified?

  3. #3
    Join Date
    May 2012
    Beans
    36

    Re: 12.04 - kjournald keeping my harddrive busy

    How can I reduce journal writes?

    I am wondering if anyone experiencing disk activities like myself.
    The questions are asked occasionally, and have been asked for years with various Linux distributions. I am not technically savvy, but I can read, mostly, and the answers seem to be...
    - Opinions differ on whether policies/parameters should be changed to decrease journal writes.
    - Yes, some users experience writes every few seconds.

    I am *not* experiencing "continuous writing" on three installs of Ubuntu 12.04, but based on what I've seen with other distros I'm not surprised that experiences of various users are different. Here is a recent thread about the same issue...
    http://ubuntuforums.org/showthread.php?t=2018313

    Check out steeldriver's post #6 where there is a suggestion that the activity is more likely a symptom than a cause, and where there's a nice one-liner to check activity in 3 logs.

    I truly hope that somebody here can help you find the root cause of the constant writes. Only once in the past have I seen an answer that I felt that I could implement with some confidence, and that was to disable a process that does not exist in Ubuntu 12.04.

  4. #4
    Join Date
    Jun 2005
    Location
    de.munich
    Beans
    186
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 - kjournald keeping my harddrive busy

    Thanks for answer.

    Yesterday when I searched here in forums for a solution I did not find this thread. It is very helpful. Thank you very much.

    Quote Originally Posted by chocklet View Post
    ...
    - Opinions differ on whether policies/parameters should be changed to decrease journal writes.
    ...
    Well this parameter change should only be done if one knows what needs getting done. This is correct.

    I do remember in late 90th this was the default situation with Linux that one needed to know. But anyways...

  5. #5
    Join Date
    Jun 2005
    Location
    de.munich
    Beans
    186
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 - keeping my harddrive busy

    Quote Originally Posted by chocklet View Post
    ...
    - Yes, some users experience writes every few seconds.

    I am *not* experiencing "continuous writing" on three installs of Ubuntu 12.04, but based on what I've seen with other distros I'm not surprised that experiences of various users are different. Here is a recent thread about the same issue...
    http://ubuntuforums.org/showthread.php?t=2018313

    Check out steeldriver's post #6 where there is a suggestion that the activity is more likely a symptom than a cause, and where there's a nice one-liner to check activity in 3 logs.
    Until now I lived with this permanent writes.

    The tool iotop shows a process list similar to that of top but lists harddrive acivities.

    What was surprising to me is the fact that kjournald is only active when user interaction takes place. When the system is idle it nearly does nothing.

    I have a VMware Workstation 8 running on this machine. This is one of that causes of hdd access. Every some seconds it gets active. VMware digs deeply into the system.

    But I also found (I admit that I was somewhat shocked), that chrome does - even if not started, yet - a lot of continous writes. For what reason? For example it is totally unclear to me why in all world any extensions seems to get preloaded. As of this the chrome-sandbox is running, too. When I killed the processes using SysControl then the hdd activity dramatically decreased.

    I uninstalled any chrome extensions (except stylish) and there are still threads loading during system start (user login).

    Anyone having an idea if this background Chrome threads can be blocked UNTIL the browser is started? More disturbing - there are Chrome threads that cannot get unloaded if loaded once.

  6. #6
    Join Date
    Jun 2005
    Location
    de.munich
    Beans
    186
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Re: 12.04 - kjournald keeping my harddrive busy

    Update -- regarding Chrome -- (SOLVED)
    description how to solve it, here:
    https://plus.google.com/103424173907...ts/GvMQbUXFDjc

    Update -- regarding kjournald

    kjournald is writing about all 30 s to disk.

    VMware Workstation 8 is installed on this machine. It is actively running some processes in the back. I found some old hints that describes same problems in conjunction VMware and ext3.

    Because of this I restarted my search and found a hint in log file:
    /var/log/vmware/hostd.log

    Code:
    ...
    2013-02-16T16:02:57.066+01:00 [7FB769F4F740 info 'Memory checker'] Check resources every 30 secs, soft limit 552960, hard limit 768000.
    2013-02-16T16:02:57.066+01:00 [7FB769F4F740 verbose 'Default'] Running AutoPowerOn task...
    Could this memory checks every 30 s cause that kjournald acitvities?

    Is there any utility that could show what processes keep kjournald busy? Or is kjournald simply a black box without any debugging options?

    Any insights are highly appreciated.

  7. #7
    Join Date
    Jun 2005
    Location
    de.munich
    Beans
    186
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 - kjournald keeping my harddrive busy

    [Solution for Ubuntu 12.10 using EXT4]

    That 12.04 box I mentioned before was set up using EXT3. I did some tests on a brand new installed 12.10 using EXT4. Guess what? Yes is a daemon, too. This ones name is jbd2 and constantly penetrates every some seconds harddrive as kjournald in EXT3.

    GOOD NEWS HERE ! that solves this trouble.

    I installed laptop-mode-tools (on 12.10) and changed some entries in
    /etc/laptop-mode/laptop-mode.conf

    LOG_TO_SYSLOG=0
    ENABLE_LAPTOP_MODE_ON_BATTERY=0
    ENABLE_LAPTOP_MODE_ON_AC=1
    ENABLE_AUTO_MODULES=1

    and
    LM_AC_MAX_LOST_WORK_SECONDS=600

    To test it (without rebooting machine)
    $ sudo /etc/init.d/laptop-mode start (or restart)

    On that 12.10 machine there is a SSD built into. That upperly mentioned modification DRAMATICALLY reduced disk access. To check this I used:
    $ sudo iotop -obtqqq | grep jbd2

    It seems to dynamically reduce this journaling updates. Only if (user) program activities are detected by the system it is writing stuff out to disk.


    Next try will be to test this on that 12.04 box.

    Maybe anyone reading along with experience in this, could please give me a hint if this solution will affect smbd fileserver activity in an unexpected way (negative side effects)? This machine is used primarily in my own context. No high loads, just two concurrent users at max.
    Last edited by lptr; February 19th, 2013 at 05:00 PM. Reason: entry corrected: LM_AC_MAX_LOST_WORK_SECONDS=600

  8. #8
    Join Date
    Jun 2005
    Location
    de.munich
    Beans
    186
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 - kjournald keeping my harddrive busy

    [SOLVED ! -- for 12.04, too]

    The upper described way seem to work in Ubuntu 12.04 either.

    Install laptop-mode-tools edit config file entries like described and restart.

    kjournald does reduce writing to disk dramatical.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •