From owner-freebsd-stable@FreeBSD.ORG Sun Apr 14 15:02:13 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 63352DB for ; Sun, 14 Apr 2013 15:02:13 +0000 (UTC) (envelope-from jcm@visi.com) Received: from g2host.com (mailback4.g2host.com [208.42.184.244]) by mx1.freebsd.org (Postfix) with ESMTP id 21637201 for ; Sun, 14 Apr 2013 15:02:12 +0000 (UTC) Received: from [208.42.90.57] (account jcm@visi.com) by mailback4.g2host.com (CommuniGate Pro WEBUSER 5.3.11) with HTTP id 12752490 for freebsd-stable@freebsd.org; Sun, 14 Apr 2013 10:02:06 -0500 From: "John Mehr" Subject: Re: svn - but smaller? To: X-Mailer: CommuniGate Pro WebUser v5.3.11 Date: Sun, 14 Apr 2013 10:02:06 -0500 Message-ID: In-Reply-To: <5169447A.6020904@gmail.com> References: <55f7d158-b02d-49f4-8181-8711be8d5647@googlegroups.com> <51691775.3000006@gmail.com> <5169447A.6020904@gmail.com> MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1; format="flowed" Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2013 15:02:13 -0000 On Sat, 13 Apr 2013 14:41:46 +0300  Markiyan Kushnir wrote: > On 13.04.2013 11:29, Markiyan Kushnir wrote: >> The only thing I would like to add -- tree lookup did >>make a good effect >> on CPU consumption. >> > John, > > I'm just curious, did you consider sys/tree.h for tree >implementation? I realize that it wouldn't be well >portable to Linux. Any way, did you have other >considerations to use your own tree implementation in >svnup? Hello, Actually, the thought of using sys/tree.h never crossed my mind.  I wrote my own tree implementation a couple of years ago in Objective-C for a different project and re-implementing it in pure C only took me an hour or so to complete. > > -- > Markiyan. > >> -- >> Markiyan. >> >> >> On 13.04.2013 10:38, mrboco@gmail.com wrote: >>>> In the previous version (0.61), the process of checking >>>> file names against the list of known files in the >>>> repository was inefficient and most likely accounts for >>>> the slow down you're seeing.  I've reimplemented it >>>>using >>>> a binary search tree and the lookup phase is no longer a >>>> bottleneck. >>> >>> I'm sorry but 0.62 still locks while fetching from a >>>local repository: >>> >>> last pid: 74701;  load averages:  2.24,  2.52, >>> 2.56                                           up >>>772+03:32:23 13:19:55 >>> 96 processes:  2 running, 94 sleeping >>> CPU: 14.8% user,  0.0% nice, 40.3% system,  0.7% >>>interrupt, 44.2% idle >>> Mem: 1191M Active, 436M Inact, 248M Wired, 76M Cache, >>>112M Buf, 50M Free >>> Swap: 1024M Total, 232M Used, 792M Free, 22% Inuse >>> >>>    PID USERNAME   THR PRI NICE   SIZE    RES STATE   C >>>  TIME   WCPU >>> COMMAND >>> 30193 root         1 117    0 56220K  9108K CPU1    1 >>> 99:16 96.39% svnup >>> >>> The send/receive queues are filled up and not changing >>>over time: >>> >>> root@alpha:~# netstat -an | fgrep -w 3690 >>> tcp4    8192  24576 81.30.199.66.3690 >>>     81.30.199.66.44473 >>> ESTABLISHED >>> tcp4   24576  16384 81.30.199.66.44473 >>>    81.30.199.66.3690 >>> ESTABLISHED >>> tcp4       0      0 *.3690                 *.* >>>                   LISTEN >>> >>> root@alpha:~# kdump | head -40 >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>>   30193 svnup    RET   write -1 errno 35 Resource >>>temporarily unavailable >>>   30193 svnup    CALL  write(0x3,0x8843a000,0xd91) >>> >>> I think you should either use blocking IO or catch IO >>>errors. And >>> please consider to set the socket options too. >>> >>> Thanks. >>> _______________________________________________ >>> freebsd-stable@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >>> To unsubscribe, send any mail to >>>"freebsd-stable-unsubscribe@freebsd.org" >>> >> > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to >"freebsd-stable-unsubscribe@freebsd.org" >