Skip to contentSkip to conversation

Is the checkpoint interval adjustable?

DISCUSSION Mike Audia 4 participants 5 messages Jul 31, 2013 – Aug 4, 2013 Btrfs file system

lore
Share & tools
lore

Mike Audia

author
#0 lore raw

I believe 30 sec is the default for the checkpoint interval.  Is this adjustable?

#1 lore raw
Quoted 1 line · Mike Audia

I believe 30 sec is the default for the checkpoint interval.  Is this adjustable?

It doesn't look like it. It looks like it's implemented with raw '30's in the code.

                delay = HZ * 30;
...
                    (now < cur->start_time || now - cur->start_time <

30)) {

If you want more frequent forced commits you could always syncfs() regularly from userspace, I suppose.

- z

#2 lore raw
In reply to Mike Audia
Quoted 5 lines · Mike Audia

I believe 30 sec is the default for the checkpoint interval. Is this adjustable? --
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Just curious: What would be the benefit of increasing the checkpoint interval?

As far as I understood it would not decrease write load on the drives because it will only update a few pointers and probably increase the generation number...

Greetings,
Kai

#3 lore raw
Quoted 9 lines · Kai Krakow
Quoted 5 lines · Mike Audia

I believe 30 sec is the default for the checkpoint interval. Is this adjustable? --
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Just curious: What would be the benefit of increasing the checkpoint interval?

Laptops typically spin down disks to save power. If btrfs forces a write every 30 second, you have to spin it back up.

--
Torbjørn

Quoted 7 lines

As far as I understood it would not decrease write load on the drives because it will only update a few pointers and probably increase the generation number...

Greetings,
Kai

#4 lore raw
Quoted 4 lines · Torbjørn
Quoted 2 lines

Just curious: What would be the benefit of increasing the checkpoint interval?

Laptops typically spin down disks to save power. If btrfs forces a write every 30 second, you have to spin it back up.

I'd expect btrfs not to write to the disk when a checkpoint is reached and no writes occurred to the filesystem meanwhile... Could some developer shed some light on this?

IMHO if this is true, there is no point in increasing the checkpoint interval... Thoughts?

Regards,
Kai