From akruijff@www.kruijff.org  Sun Sep  6 21:53:05 2009
Return-Path: <akruijff@www.kruijff.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1185B106568D
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  6 Sep 2009 21:53:05 +0000 (UTC)
	(envelope-from akruijff@www.kruijff.org)
Received: from rotring.dds.nl (rotring.dds.nl [85.17.178.138])
	by mx1.freebsd.org (Postfix) with ESMTP id 9FB328FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  6 Sep 2009 21:53:04 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by rotring.dds.nl (Postfix) with ESMTP id D374D58120
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  6 Sep 2009 23:53:03 +0200 (CEST)
Received: from www.kruijff.org (195-241-9-169.adsl.dds.nl [195.241.9.169])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by rotring.dds.nl (Postfix) with ESMTP id 8144258121;
	Sun,  6 Sep 2009 23:52:57 +0200 (CEST)
Received: from Server1.lan (localhost [127.0.0.1])
	by www.kruijff.org (8.13.6/8.13.6) with ESMTP id n86LqutO014143;
	Sun, 6 Sep 2009 23:52:56 +0200 (CEST)
	(envelope-from akruijff@Server1.lan)
Received: (from root@localhost)
	by Server1.lan (8.13.6/8.13.6/Submit) id n86Lqu5V014142;
	Sun, 6 Sep 2009 23:52:56 +0200 (CEST)
	(envelope-from akruijff)
Message-Id: <200909062152.n86Lqu5V014142@Server1.lan>
Date: Sun, 6 Sep 2009 23:52:56 +0200 (CEST)
From: Alex de Kruijff <samesame@akruijff.dds.nl>
Reply-To: Alex de Kruijff <samesame@akruijff.dds.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Alex de Kruijff <samesame@akruijff.dds.nl>
Subject: [MAINTAINER] sysutils/samesame vlruwk problem
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         138596
>Category:       ports
>Synopsis:       [MAINTAINER] sysutils/samesame vlruwk problem
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 06 22:00:02 UTC 2009
>Closed-Date:    Wed Oct 14 12:08:51 UTC 2009
>Last-Modified:  Wed Oct 14 12:08:51 UTC 2009
>Originator:     Alex de Kruijff
>Release:        
>Organization:
>Environment:

FreeBSD Server1.lan 6.1-RELEASE-p20 FreeBSD 6.1-RELEASE-p20 #0: Wed Nov 14 02:07:49 CET 2007     akruijff@Server1.lan:/temp/obj/temp/src/sys/SERVER-SMP  i386

FreeBSD Gateway.lan 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #0: Fri Feb  6 03:34:06 CET 2009     akruijff@Gateway.lan:/temp/obj/temp/src/sys/SERVER  i386

>Description:
        
If unlink(2) is called very quicky, very ofter in a small amount of time,
then the system is left in a vlruwk state. 'sysctl -a | grep vn' shows
that there are few free vnodes. It just so happens that my program has a
use for that.

>How-To-Repeat:
        
Wait for report ports/138590 to be handeld, then
samefile -V and sameln -V should give "SameSame 1.5 ..."

cp -Rp /usr/src /usr/src1
cp -Rp /usr/src /usr/src2
cp -Rp /usr/src /usr/src..
cp -Rp /usr/src /usr/srcN
find /usr/src* -type f | samefile -i > .samefile
sameln -w < .samefile
>Fix:

1) Whe using -w hurts, don't use it. It can still be used in a pipe but
   there's little advantage in that.
2) It looks like a problem in the kernel.
3) A work around in the SameSame code:

I'm assuming this is FreeBSD related, therefor I was thinking of patch
file. The patch file should add code that checks the vnodes level. It
can do this by modifing the file src/mainAction.cpp just before the line:
"// Is it time to sync?".

I don't work on this option any time soon. Anyone else is welkomed to.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Sun Sep 20 20:04:53 UTC 2009 
State-Changed-Why:  
I don't understand -- what should we do here? 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Sun Sep 20 20:04:53 UTC 2009 
Responsible-Changed-Why:  
I don't understand -- what should we do here? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138596 

From: Alex de Kruijff <samesame@akruijff.dds.nl>
To: pav@FreeBSD.org
Cc: freebsd-ports-bugs@FreeBSD.org, bug-followup@FreeBSD.org
Subject: Re: ports/138596: [MAINTAINER] sysutils/samesame vlruwk problem
Date: Mon, 5 Oct 2009 17:49:42 +0200

 This might be one of those bug reports where your anwser might be: sorry
 not a bug but a feature.
 
 I've run the app and the whole computer seem to freeze. I've rebooted
 a couple times. Before I filed the PR, I've googled on vlruwk and it
 seemed like this state indicated a big problem on the OS part.
 
 Since then I have come to understand this better. What happens is that
 the vnodes are running out, and FreeBSD responed to that by waiting a
 couple seconds becore executing a anything. Thus it becomes
 unresponcive.
 
 I think the ideal solution would be if the OS would slow down the app
 that is using a (very) large percentage of available vnodes, if it causes
 the computer to run out of available vnodes.
 
 I've also learned that the problem goes away if the value kern.maxvnodes
 is raised by the administrator,  but in my case this needed to add at
 least 200%.
 
 # sysctl kern.maxvnodes = <kern.maxvnodes> + 10 000
 
 I've run the app as root. And having root privileges this was easy for
 me to do, once I knew how to respond to this.
 
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Wed Oct 14 12:08:34 UTC 2009 
State-Changed-Why:  
Closing 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138596 
>Unformatted:
