🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fa.caml
Article #124

Re: [Caml-list] Memory fragmentation

#124
From: SerP
Date: Fri, 20 Apr 2012 18:33
39 lines
4448 bytes
>
> If that is the case then maybe it would help to try and allocate memory in
> the OCaml's runtime by using mmap() directly.
>
Yes, i need to try this.

>
> Is your application completely single-threaded (since you're using lwt),
> or do you also use multiple threads?
> I think that glibc caches mmap-ed areas even if you free them (i.e.
> they're still mapped into your process but they might be changed via
> mprotect() to PROT_NONE), which is especially a problem if you use multiple
> threads.
>
Lwt use threads for some bloking system calls, so my application has
multiple threads.

Strange behaviour is that the before (first|second) compaction all ocaml
memory (1GB) was in mmaped area, but after all ocaml memory in placed in
brked memory and later all allocations occurs throught brk. major_heap - is
2MB


> Best regards,
> --Edwin
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Technical Details
Message-ID: <fa.k/Aas915UdTnL5Ur37e2DnLPd2M@ifi.uio.no>
Path: arc1-ca.pugleaf.net!r9ni78927pbh.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!uio.no!nntp.uio.no!.POSTED!not-for-mail
References: <fa.BQPDkp4GTICgezqMipjyzfGHFCk@ifi.uio.no> <fa./QhU1susg5I2sxeCxgPZFPt/8n0@ifi.uio.no> <fa.WQddSqm8+UY6SC1medqyBYdIiMs@ifi.uio.no>

Show Full Headers
Complete Article Headers
X-Google-Thread: ff861,73392fc8a24639f4
X-Google-NewGroupId: yes
X-Google-Attributes: gidc0fe4b917e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.68.233.69 with SMTP id tu5mr6437332pbc.6.1334946799617;
        Fri, 20 Apr 2012 11:33:19 -0700 (PDT)
Path: arc1-ca.pugleaf.net!r9ni78927pbh.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!uio.no!nntp.uio.no!.POSTED!not-for-mail
From: SerP <serp256@gmail.com>
Newsgroups: fa.caml
Subject: Re: [Caml-list] Memory fragmentation
Date: Fri, 20 Apr 2012 18:33:19 UTC
Organization: Internet mailing list
Lines: 47
Message-ID: <fa.k/Aas915UdTnL5Ur37e2DnLPd2M@ifi.uio.no>
References: <fa.BQPDkp4GTICgezqMipjyzfGHFCk@ifi.uio.no> <fa./QhU1susg5I2sxeCxgPZFPt/8n0@ifi.uio.no> <fa.WQddSqm8+UY6SC1medqyBYdIiMs@ifi.uio.no>
NNTP-Posting-Host: mail-jess.uio.no
Mime-Version: 1.0
X-Trace: readme.uio.no 1334946799 30072 129.240.7.9 (20 Apr 2012 18:33:19 GMT)
X-Complaints-To: abuse@uio.no
NNTP-Posting-Date: Fri, 20 Apr 2012 18:33:19 +0000 (UTC)
To: caml-list@inria.fr
X-IronPort-AV: E=Sophos;i="4.75,454,1330902000"; 
   d="scan'208";a="154928634"
X-Authentication-Warning: walapai.inria.fr: sympa set sender to caml-list-owner@inria.fr using -f
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AiUCALGqkU/RVdW2kGdsb2JhbABEn1yIWgGIeQgiAQEBAQkJDQcUBCOCCQEBAQMBEgIsARsSDAMBCwYFBAcaISIBEQEFAQoSKxCHXgEDBgULnAUKjCKCc4UqChknAwpXiHYBBQuNN4MlBIhdhTKHaoERjUw9hA8
X-IronPort-AV: E=Sophos;i="4.75,454,1330902000"; 
   d="scan'208";a="140980729"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=74kYwZ1Kq69KgzVfcQqHsBq/Na3v15PsqcuM5ay9AKo=;
        b=0l7ugTH2ZKMEj8Xq+qk+4ovUhE0y0RQN4a1I7VpPZjrDqdRL/tBxUEqzAq2B+WcqG9
         C86inZVwm9uiUectqSCjtkMKlnAWuiy8vEn6mGsyGeRm9P4BwLRUudJE5KadgqXZxNoR
         K+ScjzIfLIJXrO5gP5FSDHmuJ4Jo2Xd+/BBtt3xAAO0377m9PC/wSODyhQ+ESgrtHosX
         DEYxcRgtXCe3sHxBCxYxJ+zjkoe1fbr/CJeoJIOyKufMEjV/YNFHCJ52bifN6tZSKr0L
         Xqu26WtWYLyLktnR5/iKZa40BDxfx9HG8SragbPXadY6svIvL7XER8Qca7DDbId/x5WY
         v9UA==
In-Reply-To: <4F9191D5.6060809@etorok.net>
X-Sequence: 3950
List-Id: <caml-list.inria.fr>
List-Archive: <https://sympa-roc.inria.fr/wws/arc/caml-list>
List-Help: <mailto:sympa@inria.fr?subject=help>
List-Owner: <mailto:caml-list-request@inria.fr>
List-Post: <mailto:caml-list@inria.fr>
List-Subscribe: <mailto:sympa@inria.fr?subject=subscribe%20caml-list>
List-Unsubscribe: <mailto:sympa@inria.fr?subject=unsubscribe%20caml-list>
X-FA-Processed: Removed HTML alternative
Original-Date: Fri, 20 Apr 2012 22:32:50 +0400
Original-Message-Id: <CAHgca+_BGYZC=tvNqMBS+iEhw-vbnPzO3s8qhRxbsxJm_pzxTw@mail.gmail.com>
Original-References: <CAHgca+9-K71NynNVzS0Stnb2v5Tc6n5ecCnJHZorhuB8y8EdTw@mail.gmail.com>
 <CAHgca+_OD0twkZ6WPc2bkQtEAS6Qnj1ogTDLE-S4esw6GKAV9A@mail.gmail.com>
 <4F9191D5.6060809@etorok.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit