All of lore.kernel.org
 help / color / mirror / Atom feed
* freemem-slack and large memory environments
@ 2015-02-10  1:27 Mike Latimer
  2015-02-10 21:34 ` Mike Latimer
  0 siblings, 1 reply; 41+ messages in thread
From: Mike Latimer @ 2015-02-10  1:27 UTC (permalink / raw)
  To: xen-devel

Hi,

While testing commit 2563bca1, I found that libxl_get_free_memory returns 0 
until there is more free memory than required for freemem-slack. This means 
that during the domain creation process, freed memory is first set aside for 
freemem-slack, then marked as truly free for consumption.

On machines with large amounts of memory, freemem-slack can be very high (26GB 
on a 2TB test machine). If freeing this memory takes more time than allowed 
during domain startup, domain creation fails with ERROR_NOMEM. (Commit 
2563bca1 doesn't help here, as free_memkb remains 0 until freemem-slack is 
satisfied.)

There is already a 15% limit on the size of freemem-slack (commit a39b5bc6), 
but this does not take into consideration very large memory environments. 
(26GB is only 1.2% of 2TB), where this limit is not hit.

It seems that there are two approaches to resolve this:

 - Introduce a hard limit on freemem-slack to avoid unnecessarily large 
reservations
 - Increase the retry count during domain creation to ensure enough time is 
set aside for any cycles spent freeing memory for freemem-slack (on the test 
machine, doubling the retry count to 6 is the minimum required)

Which is the best approach (or did I miss something)?

Thanks!
Mike

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

end of thread, other threads:[~2015-03-03 10:40 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10  1:27 freemem-slack and large memory environments Mike Latimer
2015-02-10 21:34 ` Mike Latimer
2015-02-13 11:13   ` Wei Liu
2015-02-13 23:16     ` Mike Latimer
2015-02-18 14:10   ` Ian Campbell
2015-02-24 16:06     ` Stefano Stabellini
2015-02-24 16:54       ` Ian Campbell
2015-02-25 11:39         ` Stefano Stabellini
2015-02-25 12:00           ` Ian Campbell
2015-02-25 14:03             ` Ian Campbell
2015-02-25 14:09               ` Stefano Stabellini
2015-02-26 15:36                 ` Mike Latimer
2015-02-26 15:57                   ` Ian Campbell
2015-02-26 17:38                     ` Mike Latimer
2015-02-26 17:47                       ` Ian Campbell
2015-02-26 20:38                         ` Mike Latimer
2015-02-27 10:17                           ` Ian Campbell
2015-02-27 11:05                             ` Stefano Stabellini
2015-02-26 17:53                       ` Stefano Stabellini
2015-02-26 20:45                         ` Mike Latimer
2015-02-26 23:30                           ` Mike Latimer
2015-02-27 10:21                             ` Ian Campbell
2015-02-27 10:52                             ` Stefano Stabellini
2015-02-27 15:28                               ` Mike Latimer
2015-02-27 18:29                                 ` Mike Latimer
2015-02-28  0:31                                   ` Mike Latimer
2015-03-02 10:12                                     ` Stefano Stabellini
2015-03-02 10:44                                       ` Jan Beulich
2015-03-02 12:13                                         ` Stefano Stabellini
2015-03-02 13:04                                           ` Jan Beulich
     [not found]                                           ` <54F46DDB020000780006505B@suse.com>
2015-03-02 22:49                                             ` Mike Latimer
2015-03-02 11:42                                     ` Ian Campbell
2015-03-02 15:19                                       ` Stefano Stabellini
2015-03-02 16:04                                         ` Ian Campbell
2015-03-02 16:15                                           ` Stefano Stabellini
2015-03-02 22:49                                             ` Mike Latimer
2015-03-03 10:02                                               ` Ian Campbell
2015-03-03 10:32                                                 ` Stefano Stabellini
2015-03-03 10:40                                               ` Stefano Stabellini
2015-02-27  8:24                         ` Jan Beulich
2015-02-27 10:52                           ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.