Linux NILFS development
 help / color / mirror / Atom feed
From: Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
To: users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org,
	mniederle-RbZlAiThDcE@public.gmane.org
Subject: Re: Bug Report
Date: Fri, 12 Jun 2009 15:44:11 +0900 (JST)	[thread overview]
Message-ID: <20090612.154411.85670752.ryusuke@osrg.net> (raw)
In-Reply-To: <20090611195123.46d7a684@simplux>

Hi,
On Thu, 11 Jun 2009 19:51:23 +0200, "Dipl.-Ing. Michael Niederle" wrote:
> Hi!
> 
> Today I installed SIMPLUX on a freshly formatted 30GB partition on a
> pen drive.  I updated the whole system, compiled and installed the
> final version of the 2.6.30 kernel. I did not apply any further
> nilfs-patches. Everything worked fine. Then (using the new kernel) I
> deleted several GB of old data. The garbage collection worked really
> slow, so I changed the settings in nilfs_cleanerd.conf as follows:
> 
> protection_period	900
> selection_policy	timestamp
> nsegments_per_clean	10
> cleaning_interval	5
> use_mmap
> log_priority		info
> 
> Then I restarted the cleaner daemon and was happy to see now much
> more activity on the pen-drive. The garbage collection claimed back
> MB after MB. I thought it would take some time for the garbage
> collection to complete and left the room.
>
> When I returned the machine was completely crashed (black screen - maybe due
> to the screen saver). I could only reboot it via "ctrl-alt-sysrqst USB".
> 
> There was no background job during the time of the crash - just an idling
> X-desktop (iceWM - so only very few running daemons).
> 
> The next reboot took half an hour! Here an excerpt from the kernel
> log:
> 
> [    2.407501] usb-storage: device scan complete
> [    2.456443] sd 2:0:0:1: [sdd] Attached SCSI removable disk
> [ 1759.409004] segctord starting. Construction interval = 5 seconds, CP frequenc
> [ 1759.421950] NILFS warning: mounting unchecked fs
> [ 1759.456071] NILFS: recovery complete.
> 
> It seems nilfs read the whole partition - byte for byte. This would take
> approximately the time spent. Wouldn't it suffice to read all segment headers
> to recover? The pen drive can handle more than 2000 reads per second.

It's obviously abnormal.  Nilfs stores a pointer to the latest log in
superblocks.  If power failure occurs, nilfs tries to recover newer
logs by scanning them from the pointed log.

So, your problem seems that neither superblock has been written back
to your pendrive for very long period.

I think the heavy GC load prevented the writeback.

In general, decreasing cleaning_interval is safer than increasing the
nsegments_per_clean to accelerate garbage collection.

Okay, I'll consider enforcing writeback of superblocks to avoid long
duration recovery on mount.

Thank you for reporting this issue.

> Before it (presumably) crashed the system the cleaner daemon had done a
> nice job - freeing several GB of unused space (but not yet completed the
> garbage collection).
> 
> Greetings, Michael

Regards,
Ryusuke Konishi

      reply	other threads:[~2009-06-12  6:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1244602801.14549.users@nilfs.org>
     [not found] ` <mailman.1.1244602801.14549.users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org>
2009-06-11 17:51   ` Bug Report Dipl.-Ing. Michael Niederle
2009-06-12  6:44     ` Ryusuke Konishi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090612.154411.85670752.ryusuke@osrg.net \
    --to=ryusuke-sg5x7nla6pw@public.gmane.org \
    --cc=mniederle-RbZlAiThDcE@public.gmane.org \
    --cc=users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox