linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [Bug 107771] New: Single process tries to use more than 1/2 physical RAM, OS starts thrashing
       [not found] <bug-107771-27@https.bugzilla.kernel.org/>
@ 2016-04-15 19:15 ` Andrew Morton
  2016-04-15 19:31   ` Rik van Riel
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2016-04-15 19:15 UTC (permalink / raw)
  To: linux-mm
  Cc: bugzilla-daemon, Rik van Riel, Johannes Weiner, Mel Gorman,
	theosib


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

This is ... interesting.

On Thu, 12 Nov 2015 18:46:35 +0000 bugzilla-daemon@bugzilla.kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=107771
> 
>             Bug ID: 107771
>            Summary: Single process tries to use more than 1/2 physical
>                     RAM, OS starts thrashing
>            Product: Memory Management
>            Version: 2.5
>     Kernel Version: 4.3.0-040300-generic (Ubuntu)
>           Hardware: All
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Page Allocator
>           Assignee: akpm@linux-foundation.org
>           Reporter: theosib@gmail.com
>         Regression: No
> 
> I have a 24-core (48 thread) system with 64GB of RAM.  
> 
> When I run multiple processes, I can use all of physical RAM before swapping
> starts.  However, if I'm running only a *single* process, the system will start
> swapping after I've exceeded only 1/2 of available physical RAM.  Only after
> swap fills does it start using more of the physical RAM.  
> 
> I can't find any ulimit settings or anything else that would cause this to
> happen intentionally. 
> 
> I had originally filed this against Ubuntu, but I'm now running a more recent
> kernel, and the problem persists, so I think it's more appropriate to file
> here.  There are some logs that they had me collect, so if you want to see
> them, the are here:
> 
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1513673
> 
> I don't recall this problem happening with older kernels (whatever came with
> Ubuntu 15.04), although I may just not have noticed.  By swapping early, I'm
> limited by the speed of my SSD, which is moving only about 20MB/sec in each
> direction, and that makes what I'm running take 10 times as long to complete.
> 
> -- 
> You are receiving this mail because:
> You are the assignee for the bug.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug 107771] New: Single process tries to use more than 1/2 physical RAM, OS starts thrashing
  2016-04-15 19:15 ` [Bug 107771] New: Single process tries to use more than 1/2 physical RAM, OS starts thrashing Andrew Morton
@ 2016-04-15 19:31   ` Rik van Riel
  2016-04-17 18:53     ` Michal Hocko
  2016-04-22 22:44     ` Timothy Normand Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Rik van Riel @ 2016-04-15 19:31 UTC (permalink / raw)
  To: Andrew Morton, linux-mm
  Cc: bugzilla-daemon, Johannes Weiner, Mel Gorman, theosib

[-- Attachment #1: Type: text/plain, Size: 2608 bytes --]

On Fri, 2016-04-15 at 12:15 -0700, Andrew Morton wrote:
> (switched to email.  Please respond via emailed reply-to-all, not via
> the
> bugzilla web interface).
> 
> This is ... interesting.

First things first. What is the value of
/proc/sys/vm/zone_reclaim?

I am assuming this is a two socket system,
with two 12-core CPUs. Am I right?

> On Thu, 12 Nov 2015 18:46:35 +0000 bugzilla-
> daemon@bugzilla.kernel.org wrote:
> 
> > 
> > https://bugzilla.kernel.org/show_bug.cgi?id=107771
> > 
> >             Bug ID: 107771
> >            Summary: Single process tries to use more than 1/2
> > physical
> >                     RAM, OS starts thrashing
> >            Product: Memory Management
> >            Version: 2.5
> >     Kernel Version: 4.3.0-040300-generic (Ubuntu)
> >           Hardware: All
> >                 OS: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: Page Allocator
> >           Assignee: akpm@linux-foundation.org
> >           Reporter: theosib@gmail.com
> >         Regression: No
> > 
> > I have a 24-core (48 thread) system with 64GB of RAM.  
> > 
> > When I run multiple processes, I can use all of physical RAM before
> > swapping
> > starts.  However, if I'm running only a *single* process, the
> > system will start
> > swapping after I've exceeded only 1/2 of available physical
> > RAM.  Only after
> > swap fills does it start using more of the physical RAM.  
> > 
> > I can't find any ulimit settings or anything else that would cause
> > this to
> > happen intentionally. 
> > 
> > I had originally filed this against Ubuntu, but I'm now running a
> > more recent
> > kernel, and the problem persists, so I think it's more appropriate
> > to file
> > here.  There are some logs that they had me collect, so if you want
> > to see
> > them, the are here:
> > 
> > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1513673
> > 
> > I don't recall this problem happening with older kernels (whatever
> > came with
> > Ubuntu 15.04), although I may just not have noticed.  By swapping
> > early, I'm
> > limited by the speed of my SSD, which is moving only about 20MB/sec
> > in each
> > direction, and that makes what I'm running take 10 times as long to
> > complete.
> > 
-- 
All Rights Reversed.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug 107771] New: Single process tries to use more than 1/2 physical RAM, OS starts thrashing
  2016-04-15 19:31   ` Rik van Riel
@ 2016-04-17 18:53     ` Michal Hocko
  2016-04-22 23:01       ` Timothy Normand Miller
  2016-04-22 22:44     ` Timothy Normand Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Michal Hocko @ 2016-04-17 18:53 UTC (permalink / raw)
  To: theosib
  Cc: Andrew Morton, linux-mm, bugzilla-daemon, Johannes Weiner,
	Mel Gorman, Rik van Riel

On Fri 15-04-16 15:31:22, Rik van Riel wrote:
> On Fri, 2016-04-15 at 12:15 -0700, Andrew Morton wrote:
> > (switched to email.  Please respond via emailed reply-to-all, not via
> > the
> > bugzilla web interface).
> > 
> > This is ... interesting.
> 
> First things first. What is the value of
> /proc/sys/vm/zone_reclaim?

Also snapshots of /proc/vmstat taken every 1s or so while you see the
trashing would be helpful.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug 107771] New: Single process tries to use more than 1/2 physical RAM, OS starts thrashing
  2016-04-15 19:31   ` Rik van Riel
  2016-04-17 18:53     ` Michal Hocko
@ 2016-04-22 22:44     ` Timothy Normand Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Timothy Normand Miller @ 2016-04-22 22:44 UTC (permalink / raw)
  To: Rik van Riel
  Cc: Andrew Morton, linux-mm, bugzilla-daemon, Johannes Weiner,
	Mel Gorman

On Fri, Apr 15, 2016 at 3:31 PM, Rik van Riel <riel@redhat.com> wrote:
> On Fri, 2016-04-15 at 12:15 -0700, Andrew Morton wrote:
>> (switched to email.  Please respond via emailed reply-to-all, not via
>> the
>> bugzilla web interface).
>>
>> This is ... interesting.
>
> First things first. What is the value of
> /proc/sys/vm/zone_reclaim?

There is no such thing on this system.  However:

$ cat /proc/sys/vm/zone_reclaim_mode
0

>
> I am assuming this is a two socket system,
> with two 12-core CPUs. Am I right?

Yes.

>
>> On Thu, 12 Nov 2015 18:46:35 +0000 bugzilla-
>> daemon@bugzilla.kernel.org wrote:
>>
>> >
>> > https://bugzilla.kernel.org/show_bug.cgi?id=107771
>> >
>> >             Bug ID: 107771
>> >            Summary: Single process tries to use more than 1/2
>> > physical
>> >                     RAM, OS starts thrashing
>> >            Product: Memory Management
>> >            Version: 2.5
>> >     Kernel Version: 4.3.0-040300-generic (Ubuntu)
>> >           Hardware: All
>> >                 OS: Linux
>> >               Tree: Mainline
>> >             Status: NEW
>> >           Severity: normal
>> >           Priority: P1
>> >          Component: Page Allocator
>> >           Assignee: akpm@linux-foundation.org
>> >           Reporter: theosib@gmail.com
>> >         Regression: No
>> >
>> > I have a 24-core (48 thread) system with 64GB of RAM.
>> >
>> > When I run multiple processes, I can use all of physical RAM before
>> > swapping
>> > starts.  However, if I'm running only a *single* process, the
>> > system will start
>> > swapping after I've exceeded only 1/2 of available physical
>> > RAM.  Only after
>> > swap fills does it start using more of the physical RAM.
>> >
>> > I can't find any ulimit settings or anything else that would cause
>> > this to
>> > happen intentionally.
>> >
>> > I had originally filed this against Ubuntu, but I'm now running a
>> > more recent
>> > kernel, and the problem persists, so I think it's more appropriate
>> > to file
>> > here.  There are some logs that they had me collect, so if you want
>> > to see
>> > them, the are here:
>> >
>> > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1513673
>> >
>> > I don't recall this problem happening with older kernels (whatever
>> > came with
>> > Ubuntu 15.04), although I may just not have noticed.  By swapping
>> > early, I'm
>> > limited by the speed of my SSD, which is moving only about 20MB/sec
>> > in each
>> > direction, and that makes what I'm running take 10 times as long to
>> > complete.
>> >
> --
> All Rights Reversed.
>



-- 
Timothy Normand Miller, PhD
Assistant Professor of Computer Science, Binghamton University
http://www.cs.binghamton.edu/~millerti/
Open Graphics Project

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug 107771] New: Single process tries to use more than 1/2 physical RAM, OS starts thrashing
  2016-04-17 18:53     ` Michal Hocko
@ 2016-04-22 23:01       ` Timothy Normand Miller
  0 siblings, 0 replies; 5+ messages in thread
From: Timothy Normand Miller @ 2016-04-22 23:01 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Andrew Morton, linux-mm, bugzilla-daemon, Johannes Weiner,
	Mel Gorman, Rik van Riel

On Sun, Apr 17, 2016 at 2:53 PM, Michal Hocko <mhocko@kernel.org> wrote:
> On Fri 15-04-16 15:31:22, Rik van Riel wrote:
>> On Fri, 2016-04-15 at 12:15 -0700, Andrew Morton wrote:
>> > (switched to email.  Please respond via emailed reply-to-all, not via
>> > the
>> > bugzilla web interface).
>> >
>> > This is ... interesting.
>>
>> First things first. What is the value of
>> /proc/sys/vm/zone_reclaim?
>
> Also snapshots of /proc/vmstat taken every 1s or so while you see the
> trashing would be helpful.

It's been so long since I reported this bug that I don't recall
exactly what I was doing.  I think I was running Synopsys.  I tried
artificially reproducing this by just allocating a huge amount of
memory and touching all the pages, but the problem didn't manifest.  I
wonder if Synopsys was allocating pages it didn't touch or mmaping
files or some other weird thing.


> --
> Michal Hocko
> SUSE Labs



-- 
Timothy Normand Miller, PhD
Assistant Professor of Computer Science, Binghamton University
http://www.cs.binghamton.edu/~millerti/
Open Graphics Project

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-22 23:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <bug-107771-27@https.bugzilla.kernel.org/>
2016-04-15 19:15 ` [Bug 107771] New: Single process tries to use more than 1/2 physical RAM, OS starts thrashing Andrew Morton
2016-04-15 19:31   ` Rik van Riel
2016-04-17 18:53     ` Michal Hocko
2016-04-22 23:01       ` Timothy Normand Miller
2016-04-22 22:44     ` Timothy Normand Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).