# harddisk access

## menschmeier

On my laptop every second some process is accessing (reading or writing- I don't know) the HD. 

I just to want to find which process this is, so maybe I can reconfigure this program, so it doesn't stress my HD so much.

Does someone has an idea how I can do that?

Thanks

menschmeier

----------

## frostschutz

Try the following:

```
echo 1 > /proc/sys/vm/block_dump
```

Then the kernel will print all process ids and names who write on your hard disk.

----------

## menschmeier

Thanks frostschutz,

now I found out what processes this are: kjournald (and pdflush). But I believe it is mainly kjournald.

```
Jul  9 08:17:51 moon kjournald(915): WRITE block 8749976 on hda6

Jul  9 08:17:51 moon kjournald(915): WRITE block 8448 on hda6

Jul  9 08:17:51 moon kjournald(915): WRITE block 8456 on hda6

Jul  9 08:17:51 moon kjournald(915): WRITE block 8464 on hda6

Jul  9 08:17:53 moon pdflush(201): WRITE block 34627968 on hda9

Jul  9 08:17:53 moon pdflush(201): WRITE block 59120 on hda9

Jul  9 08:17:53 moon pdflush(201): WRITE block 59128 on hda9

Jul  9 08:17:53 moon pdflush(201): WRITE block 59136 on hda9

Jul  9 08:17:53 moon pdflush(201): WRITE block 8749976 on hda6
```

How can I configure kjournald, or turn it off. I can't find any option in kde control center.

menschmeier

----------

## s0be

the K there is for kernel, not kde.  This is the kernel's journaling filesystem daemon.

----------

## dgaffuri

You may use

```
emerge laptop-mode-tools
```

and configure it to minimize hard disk usage.

----------

## frostschutz

I read a Howto once concerning laptops and energy saving, and they discussed pro and contra for several file systems as well... now I can't seem to find it anymore. But I guess a filesystem where a journal has to be written every so often, is not what you want on a laptop.

----------

## menschmeier

Hi,

I tried to emerge laptop-mode-tools. But it seems it needs APM, but I am usinf ACPI. So There must be an other way to configure kjournald. 

When the system is starting up it shows:

```
kjournald starting.  Commit interval 5 seconds
```

menschmeier

----------

## dgaffuri

 *menschmeier wrote:*   

> I tried to emerge laptop-mode-tools. But it seems it needs APM, but I am usinf ACPI.

 

You have to set -apm in USE flags.

----------

## dgaffuri

 *menschmeier wrote:*   

> So There must be an other way to configure kjournald. 
> 
> When the system is starting up it shows:
> 
> ```
> ...

 

If I remember well is something like

```
mount -o remount,commit=x /dev/hdyz
```

where x is in seconds (or you may specify the mount option in /etc/fstab).

----------

## menschmeier

Hello dgaffuri,

mount has not that option, I studied the man page.

But now I was able to compile laptop-mode-tools. I will try this.

menschmeier

----------

## dgaffuri

Hi menschmeier

 *menschmeier wrote:*   

> mount has not that option, I studied the man page.

 

Mount has that option for journaled file systems, it's simply not in man page.

```
# mount -o remount,commit=10 /dev/hda10

# mount

...

/dev/hda10 on /mnt/backups type ext3 (rw,noatime,commit=10)

...
```

BTW that's one of the options it's used by laptop-mode (look at man laptop-mode.conf and search for commit).

Anyway, it's surely better to use laptop-mode than to hack commit interval manually.

----------

## menschmeier

Thanks dgaffuri,

with laptop-mode it seems to work, it is remounting some devices with the commit option, but only the ones with ext3 or reiserfs. I am using xfs as well. I am not sure what are the recommended file systems on a laptop. 

menschmeier

----------

