From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B134DC43387 for ; Mon, 31 Dec 2018 06:24:24 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5DC292133F for ; Mon, 31 Dec 2018 06:24:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F3SYF+me" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DC292133F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1gdqzk-0006vn-Kd; Mon, 31 Dec 2018 01:24:12 -0500 Received: from mail-yw1-xc29.google.com ([2607:f8b0:4864:20::c29]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gdqzi-0006vh-Hb for kernelnewbies@kernelnewbies.org; Mon, 31 Dec 2018 01:24:10 -0500 Received: by mail-yw1-xc29.google.com with SMTP id b63so8994515ywc.11 for ; Sun, 30 Dec 2018 22:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j0bqqBwG/X1zq4SkdHKVjiKLHYbReQwfmuYx9OsUnMY=; b=F3SYF+meoqrxyeLyAk8ZUPH5fo1POSSY7eKbtsmjcjIuhjsgEgA4WvMVp/0yw2QuS8 +kQhn7Nty2kYfVDtQ0vI+V+Y9yJfrSk36Olgu9fqlSFo70t05sJNMyblI1eC6G5GU93Y PWfeaZgmVjbZX+X23ccko3KJ4QG8WxJYuRHaXNQaxBR4D8LrNgnP3TEkf8oxySzshUck Dwmz9e2dsVCqfmz80IcRkKfdBEU+akliml6nhHPWjUaF5qOf8EGFTHbzkyFGwMO2/BIj aEctxoaP631jh2ouEhKs+MYTpQqiNc/vgKj+ePppS01FVW/ueOnI0jr3MovJRntbv7e1 e8Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j0bqqBwG/X1zq4SkdHKVjiKLHYbReQwfmuYx9OsUnMY=; b=dbrTGmoEffie7sEISA49ld6pCaJajlxAZPN3yQuRMHetXpLzcZXkQgwU98mFnMDT4u MoDEoVGm82d0rWPorWI7uowTa1E/1UWO3RpB/Lvkw4I7bgraiJP1CXD7MyjiMuWCNgVR 2g/RfTf1qRdpvjXkBSdHqBDqL1XHVAAP6pIdCM5WE0IZ9b1OpLsgKEjSrP+F354f9gwE DzuiUjA62ujxbmEW+JOycMz51PNQR3HKQGyv8DwJAsqEhAXQxN1lQ3gWyc+6pj94YXTH KdJCai9XIDXIAhqjtrU1j2Vom3HeMHt5Ij5i0tpf5kwjNJ8NgSBQ21gocLZq1RqXY1px KIeQ== X-Gm-Message-State: AA+aEWaIf7g6O6e7maRAuAOFX9i8fVtLlnFPq7l6LRSMZiv8bIxR17g9 RAUOeB3H6ppySaiweN9yhCUDKe1Hv7MIs4whU6cGRQ== X-Google-Smtp-Source: AFSGD/WfEi7PihOoBUf+j9qt3fmt2D4uhURQa/Xn4LwcZ/Wj6Xyj/PI0yRZPnlwDPzT+tCBGq8WZqUc7Iyyi+QXhKg0= X-Received: by 2002:a81:350f:: with SMTP id c15mr36747480ywa.232.1546237388565; Sun, 30 Dec 2018 22:23:08 -0800 (PST) MIME-Version: 1.0 References: <2ef41c8f111a94eaaa6082f6168a56fd@amit-agarwal.co.in> In-Reply-To: <2ef41c8f111a94eaaa6082f6168a56fd@amit-agarwal.co.in> From: Manish Katiyar Date: Sun, 30 Dec 2018 22:22:57 -0800 Message-ID: Subject: Re: Understanding memory fragmentation in Linux kernel To: Amit Agarwal Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6480717143855245496==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============6480717143855245496== Content-Type: multipart/alternative; boundary="00000000000048b376057e4b725d" --00000000000048b376057e4b725d Content-Type: text/plain; charset="UTF-8" On Sun, Dec 30, 2018, 10:03 PM Amit Agarwal Hi All, > > > I am trying to understand memory fragmentation and how to understand > and/or analyze the same. > > Is there some detailed documentation on pagetypeinfo and buddyinfo files > present in the proc directory? Am I looking at right files to understand if > the memory is fragmented. > > > Problem Description: > > One of the applications does a few 200-300Mb calloc's during start-up. On > one of the production servers, the application does not start up although > there should be enough RAM available for application to start. I am > suspecting that this is because of fragmentation and would like to confirm > the same. > How do you know it is because of memory ? If you have sufficient RAM then it should be able to allocate. Does you application fail with ENOMEM ? Without knowing the error code from application it's hard to suggest anything. -- > Thanks, > -aka > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > --00000000000048b376057e4b725d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


= On Sun, Dec 30, 2018, 10:03 PM Amit Agarwal <amit@amit-agarwal.co.in wrote:

Hi All,


I am trying to understand memory fragmentation and how to understand and= /or analyze the same.

Is there some detailed documentation on pagetypeinfo and buddyinfo files= present in the proc directory? Am I looking at right files to understand i= f the memory is fragmented.


Problem Description:

One of the applications does a few 200-300Mb calloc's during start-u= p. On one of the production servers, the application does not start up alth= ough there should be enough RAM available for application to start. I am su= specting that this is because of fragmentation and would like to confirm th= e same.


How do you know it is because of memory ? If you have sufficie= nt RAM then it should be able to allocate. Does you application fail with E= NOMEM ?

Without knowing = the error code from application it's hard to suggest anything.


--
Thanks,
-aka
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies= .org/mailman/listinfo/kernelnewbies
--00000000000048b376057e4b725d-- --===============6480717143855245496== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============6480717143855245496==--