Return-Path: X-Original-To: apmail-clerezza-dev-archive@www.apache.org Delivered-To: apmail-clerezza-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3929F10905 for ; Fri, 6 Dec 2013 09:28:56 +0000 (UTC) Received: (qmail 57313 invoked by uid 500); 6 Dec 2013 09:28:55 -0000 Delivered-To: apmail-clerezza-dev-archive@clerezza.apache.org Received: (qmail 57221 invoked by uid 500); 6 Dec 2013 09:28:48 -0000 Mailing-List: contact dev-help@clerezza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@clerezza.apache.org Delivered-To: mailing list dev@clerezza.apache.org Received: (qmail 56884 invoked by uid 99); 6 Dec 2013 09:28:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 09:28:46 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andy.seaborne.apache@gmail.com designates 74.125.82.169 as permitted sender) Received: from [74.125.82.169] (HELO mail-we0-f169.google.com) (74.125.82.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 09:28:38 +0000 Received: by mail-we0-f169.google.com with SMTP id w61so382993wes.14 for ; Fri, 06 Dec 2013 01:28:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=j7Qcx+2ah2fHPuq9+HUsGTaM9TfHMh6fco4hYWTnBoE=; b=cZFE+f5PfIM5kYXrEZ+yENp88+7MIcvA+zBXQYFtfF9LScNQXOaiGt5u/AdBitGAsc rEQdqvDE9ptsJospK2to5TaRwJ1YImaa53PRUJXb6fWo4jRoFzVNoBctP/J85J60JQyS I8KzlB3mvoxasowMp1J7aZ+BvvPJSq/6JFDFLtQxiU2RqkjT0kJAudvMqeDZYBD7jXW7 s8BJf1vxfA+SCUu2MaCe3Ec1dhkCC0lJNgx9rCZMCBuhbrHarsIEMSt125Namw33NtFv 7mLP53dXNAl9i69kvrZJWLVoZ/cLWFGG9APo9Xkwx7++uuZu8bn35NNEVPMGMssQrDUc GWhg== X-Received: by 10.180.76.204 with SMTP id m12mr1498019wiw.9.1386322097608; Fri, 06 Dec 2013 01:28:17 -0800 (PST) Received: from [192.168.0.114] (cpc37-aztw23-2-0-cust35.18-1.cable.virginm.net. [94.174.128.36]) by mx.google.com with ESMTPSA id pi6sm4437696wic.3.2013.12.06.01.28.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Dec 2013 01:28:16 -0800 (PST) Message-ID: <52A198AF.2020100@apache.org> Date: Fri, 06 Dec 2013 09:28:15 +0000 From: Andy Seaborne User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: dev@clerezza.apache.org Subject: Re: Out of memory issue on tdb storage provider tests References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 05/12/13 22:56, Enrico Daga wrote: > Hi all, > I am having difficulties compiling clerezza, precisely > > [INFO] Building Clerezza - SCB Jena TDB Storage Provider 0.7-SNAPSHOT > > ... > TdbTcProviderTest>TcProviderTest.testGraphDeletion:433 ? OutOfMemory Java > heap... > TdbTcProviderTest>TcProviderTest.testGetGraph:99 ? OutOfMemory Java heap > space > TdbTcProviderTest>TcProviderTest.testGetTriplesGraph:459 ? OutOfMemory > Java he... > TdbTcProviderTest>TcProviderTest.testGraphIsNotMutable:339 ? OutOfMemory > Java ... > TdbTcProviderTest.testCreateGraph ? OutOfMemory Java heap space > TdbTcProviderTest.testGetTriplesMGraph ? OutOfMemory Java heap space > TdbTcProviderTest.testGetTriples ? OutOfMemory Java heap space > TdbTcProviderTest.testDeleteEntity ? OutOfMemory Java heap space > TdbTcProviderTest.testCreateMGraphNoDuplicateNames ? OutOfMemory Java > heap spa... > TdbTcProviderTest.testCreateMGraphExtended ? OutOfMemory Java heap space > TdbTcProviderTest.testGetMGraph ? OutOfMemory Java heap space > TdbTcProviderTest.testCreateGraphNoDuplicateNames ? OutOfMemory Java heap > spac... > TdbTcProviderTest.testCreateGraphWithInitialCollection ? OutOfMemory Java > heap... > TdbTcProviderTest.testCreateGraphExtended ? OutOfMemory Java heap space > > I tried increasing the heap until 3g (I have 4 on this machine). Is your machine a 32bit machine with 32 bit java? I'm unclear here because you say heap is 3G and I thought the 32 bit limit was 1.5G-ish. Does change in heap size move the point of failure? (TDB can't use memory mapped files on a 32 bit system so it uses old-style file IO and caches in heap; downside, uses heap.) Otherwise - internally there is a cache of open databases because opening one, and having it filesystem-cache-cold is prohibitively expensive. If the tests are creating different DB each time, this might be a partial cause of heap usage. There is StoreConnection.reset() and related operations to carefully manipulate this cache. TDB uses these for @BeforeClass/@AfterClass clean tests. For testing, in-memory TDB databases are very useful. The default is a fresh, uncached daatset on each call of TDBFactory.createDataset(). Your disk will rattle less. The tests will run faster. They have been reported as faster than normal Jena in-memory datasets but I don't see why. They work by having a RAM disk like are that bytes are written into and copied out of so it is good simulation of a disk - no accidental sharing of data. Andy > > Any hint? > > Thank you! > Enrico >