Linux NILFS development
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
To: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] nilfs-utils: Work around uncleanable full filesystem
Date: Mon, 14 Jan 2013 19:55:27 +0100	[thread overview]
Message-ID: <2856062.J1h4ec8Fju@bentobox> (raw)
In-Reply-To: <37A149BD-4D8E-4C55-9301-428034C5B9DA-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3067 bytes --]

On Monday 14 January 2013 22:49:50 Vyacheslav Dubeyko wrote:
> Hi Sven,
> 
> On Jan 14, 2013, at 6:54 PM, Sven Eckelmann wrote:
> > The filesystem can end up in a state were the filesystem is full and the
> > returned ss_nongc_ctime is smaller than sui_lastmod of all reclaimable
> > segments. The garbage collector will not clean anything and therefore no
> > new room for new files will be available and ss_nongc_ctime/sui_lastmod
> > will not be updated without using special tools. This makes the
> > filesystem unusable without manual recovery.
> > 
> > Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
> > --
> > This problem appeared on a current 3.2 stable kernel (Debian Wheezy
> > build). I am not an FS developer and have therefore not much background
> > knowledge about the NILFS codebase. Nevertheless, this problem hit me
> > quite hard after creating some files on a nilfs partition until it was
> > full and deleting them again.
> > 
> > $ for i in `seq 0 150`; do dd if=/dev/zero of=foo$i count=22528; done
> > $ rm foo*
> > 
> > Looking at the output debugging output using
> > 
> > $ watch -n .5 'df -h;tail /var/log/syslog;'
> 
> As I understand, you did such sequence of actions:
> 1. Generate such count of files that the whole size of used space was about
> the partition size. 2. Delete all generated files.
> 3. Expect that previously used space is become fully free.
> 
> Am I correct?

Nearly. Here is my config file:

protection_period       0
min_clean_segments      10%
max_clean_segments      20%
clean_check_interval    5
selection_policy        timestamp
nsegments_per_clean     8
mc_nsegments_per_clean  8
cleaning_interval       5
mc_cleaning_interval    1
retry_interval          40
use_mmap
log_priority            debug


and an alternative version

protection_period       20
min_clean_segments      10%
max_clean_segments      20%
clean_check_interval    5
selection_policy        timestamp
nsegments_per_clean     8
mc_nsegments_per_clean  8
cleaning_interval       5
mc_cleaning_interval    1
retry_interval          40
use_mmap
log_priority            debug

So I would have expected that nilfs would have some free space again after 20 
seconds (+ time it needs to free stuff). But it did not and I've showed the 
reason in my explanation (threshold vs. the time stored in each reclaimable  
segment).

At least "no free space after a work day" was not the expected result using 
this setup.

> I think that you have some misunderstanding of NILFS2 working. The GC of
> NILFS2 works in background and it needs to wait sometime before segments
> will be clean. If you have necessity to begin cleaning immediately then you
> can execute "nilfs-clean -p 0". Did you try to use it?
> 
> I think that you try to achieve by this patch the result of  "nilfs-clean -p
> 0".

This was default set in the configuration file and therefore I did not have to 
set it manually using nilfs-clean -p 0.

> Sorry, if I misunderstand something. Please, correct me if I am wrong.

See above.

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-01-14 18:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 15:54 [PATCH] nilfs-utils: Work around uncleanable full filesystem Sven Eckelmann
     [not found] ` <1358178899-26347-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
2013-01-14 19:49   ` Vyacheslav Dubeyko
     [not found]     ` <37A149BD-4D8E-4C55-9301-428034C5B9DA-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2013-01-14 18:55       ` Sven Eckelmann [this message]
2013-01-15  7:14   ` Vyacheslav Dubeyko
2013-01-15  8:34     ` Sven Eckelmann
2013-01-15 10:43     ` Ryusuke Konishi
     [not found]       ` <201301151043.AA04492-ZdTO5nnmHvkOizVVqyxoihMFgDP4sedm@public.gmane.org>
2013-01-15 13:48         ` Vyacheslav Dubeyko
2013-01-15 13:57   ` Vyacheslav Dubeyko
2013-01-15 15:17     ` Sven Eckelmann
2013-01-17  7:57       ` Vyacheslav Dubeyko
2013-01-17  8:32         ` Sven Eckelmann
2013-01-17  9:19           ` Vyacheslav Dubeyko
2013-01-18  7:04           ` Vyacheslav Dubeyko
2013-01-18  6:17         ` Vyacheslav Dubeyko

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=2856062.J1h4ec8Fju@bentobox \
    --to=sven-kadoipu9uxwei8dpzvb4nw@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=slava-yeENwD64cLxBDgjK7y7TUQ@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