9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] dirty blocks in cwfs
@ 2013-03-05  6:02 arisawa
  2013-03-05  6:22 ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: arisawa @ 2013-03-05  6:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

It seems my cwfs has too many dirty blocks.
cfws command ("dump", "check tag" and etc) is no help to decrease these blocks.
is this only to me?

cwstats main
	filesys main
		maddr  =        3
		msize  =    10313
		caddr  =     1035
		csize  =  1392255
		sbaddr =  2129493
		craddr =  2129540  2129540
		roaddr =  2129543  2129543
		fsize  =  2129545  2129545  0+30%
		slast  =           2129437
		snext  =           2129544
		wmax   =  2129543           0+30%
		wsize  =  6972701           1+ 0%
		 46964 none
		202107 dirty
		     0 dump
		1143005 read
		   179 write
		     0 dump1
		cache 16% full





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] dirty blocks in cwfs
  2013-03-05  6:02 [9fans] dirty blocks in cwfs arisawa
@ 2013-03-05  6:22 ` erik quanstrom
  2013-03-05  8:55   ` arisawa
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2013-03-05  6:22 UTC (permalink / raw)
  To: 9fans

On Tue Mar  5 01:03:23 EST 2013, arisawa@ar.aichi-u.ac.jp wrote:
> Hello,
>
> It seems my cwfs has too many dirty blocks.
> cfws command ("dump", "check tag" and etc) is no help to decrease these blocks.
> is this only to me?

i have not seen this with kenfs.  is it possible that you
are using the "t" bit that 9front added?  if so, that would
explain all the dirty blocks that never get dumped.
one also ends up with dirty superblocks that can't get
dumped because they're already written, about 1 per
day in the dump.

one thing i notice about your cache-worm is that the
cache is very large.  this is not advisable because your
cache buckets will take up too many memory buffers,
leaving little for actual data.  20G cache has been
enough.  the first big file server i set up had 750G
cache, and it thrashed the heck out of its disks.

- erik



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] dirty blocks in cwfs
  2013-03-05  6:22 ` erik quanstrom
@ 2013-03-05  8:55   ` arisawa
  2013-03-05 14:01     ` arisawa
  0 siblings, 1 reply; 8+ messages in thread
From: arisawa @ 2013-03-05  8:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

thanks erik,

> the "t" bit that 9front added
how to do?
I don't know this one.

I analyzed map area in fscache and then found:
corresponding worm blocks of dirty cache blocks are garbage.

On 2013/03/05, at 15:22, erik quanstrom <quanstro@quanstro.net> wrote:

> On Tue Mar  5 01:03:23 EST 2013, arisawa@ar.aichi-u.ac.jp wrote:
>> Hello,
>> 
>> It seems my cwfs has too many dirty blocks.
>> cfws command ("dump", "check tag" and etc) is no help to decrease these blocks.
>> is this only to me?
> 
> i have not seen this with kenfs.  is it possible that you
> are using the "t" bit that 9front added?  if so, that would
> explain all the dirty blocks that never get dumped.
> one also ends up with dirty superblocks that can't get
> dumped because they're already written, about 1 per
> day in the dump.
> 
> one thing i notice about your cache-worm is that the
> cache is very large.  this is not advisable because your
> cache buckets will take up too many memory buffers,
> leaving little for actual data.  20G cache has been
> enough.  the first big file server i set up had 750G
> cache, and it thrashed the heck out of its disks.
> 
> - erik
> 




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] dirty blocks in cwfs
  2013-03-05  8:55   ` arisawa
@ 2013-03-05 14:01     ` arisawa
  2013-03-05 14:04       ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: arisawa @ 2013-03-05 14:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

I reconsidered my problem. I said:
> corresponding worm blocks of dirty cache blocks are garbage.
now I think, this is not a problem. this is a state that it should be.
the problem is only in the fact: my dirty blocks wouldn't be dumped.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] dirty blocks in cwfs
  2013-03-05 14:01     ` arisawa
@ 2013-03-05 14:04       ` erik quanstrom
  2013-03-06 12:48         ` arisawa
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2013-03-05 14:04 UTC (permalink / raw)
  To: 9fans

On Tue Mar  5 09:02:18 EST 2013, arisawa@ar.aichi-u.ac.jp wrote:
> Hello,
>
> I reconsidered my problem. I said:
> > corresponding worm blocks of dirty cache blocks are garbage.
> now I think, this is not a problem. this is a state that it should be.
> the problem is only in the fact: my dirty blocks wouldn't be dumped.

have you ever seen information about "%lld blocks dumped"
in cwfs' log?

you might consider using acid to see if any processes are stuck
doing i/o.  though on second thought, that seems iffy.

- erik



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] dirty blocks in cwfs
  2013-03-05 14:04       ` erik quanstrom
@ 2013-03-06 12:48         ` arisawa
  2013-03-09 23:14           ` cinap_lenrek
  0 siblings, 1 reply; 8+ messages in thread
From: arisawa @ 2013-03-06 12:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

I have created dirty blocks that is not cleared by dump command.
the process is as follows:
(1) make a directory tree in somewhere.
	then we can observe these fscache blocks are in dirty state, 
	as mentioned Geoff's documents.
(2) remove the tree using clri command.
        then we can confirm these fscache blocks still exist with dirty state.
(3) dump
(4) reboot
(5) we can again confirm these fscache blocks still exist with dirty state.

I have believed the dump command clears all dirty block in fscache,
however, it seems the command clears only dirty blocks that is referenced
by main tree.

FS(8) says:
 A subsequent check free will place the abandoned storage in the free list.

I did't "check free" immediately after clri.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] dirty blocks in cwfs
  2013-03-06 12:48         ` arisawa
@ 2013-03-09 23:14           ` cinap_lenrek
  2013-03-10  1:34             ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: cinap_lenrek @ 2013-03-09 23:14 UTC (permalink / raw)
  To: 9fans

this is correct. in general, the filesystem repairing aside, dump
will always just visit blocks that are referenced in the filesystem.

for example, if you have 0 dirty blocks and then temporarily create
100MB file and then delete it *before* it is dumped. then you got
100MB of dirty blocks in the cache. these blocks will not be cleaned
out by dump as the blocks are not referneced in the filesystem. these
blocks belong to no files but are chained in the free list. these
blocks are not lost. they will be used when allocating storage for
files. if these files get dumped, the dirty pool shrinks.

--
cinap



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] dirty blocks in cwfs
  2013-03-09 23:14           ` cinap_lenrek
@ 2013-03-10  1:34             ` erik quanstrom
  0 siblings, 0 replies; 8+ messages in thread
From: erik quanstrom @ 2013-03-10  1:34 UTC (permalink / raw)
  To: 9fans

> for example, if you have 0 dirty blocks and then temporarily create
> 100MB file and then delete it *before* it is dumped. then you got
> 100MB of dirty blocks in the cache. these blocks will not be cleaned
> out by dump as the blocks are not referneced in the filesystem. these
> blocks belong to no files but are chained in the free list. these
> blocks are not lost. they will be used when allocating storage for
> files. if these files get dumped, the dirty pool shrinks.

these blocks may not be lost in the cache, but they are lost to the worm.

- erik



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-10  1:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05  6:02 [9fans] dirty blocks in cwfs arisawa
2013-03-05  6:22 ` erik quanstrom
2013-03-05  8:55   ` arisawa
2013-03-05 14:01     ` arisawa
2013-03-05 14:04       ` erik quanstrom
2013-03-06 12:48         ` arisawa
2013-03-09 23:14           ` cinap_lenrek
2013-03-10  1:34             ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).