Skip to contentSkip to conversation

default guest RAM size?

Qemu-devel Michael Tokarev 9 participants 16 messages Mar 5, 2013 – Mar 11, 2013

lore
Share & tools
lore
#0 lore raw

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

Some distributions (eg ubuntu) had a local patch to increase this value, for years.

Maybe it's time to increase the default RAM size a bit? Make it arch-specific if needs to be ?

Thanks,

/mjt

#1 lore raw
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

Quoted 5 lines

Some distributions (eg ubuntu) had a local patch to increase this value, for years.

Maybe it's time to increase the default RAM size a bit? Make it arch-specific if needs to be ?

I tried two years ago to get a 'default RAM size' parameter added to the QEMUMachine struct, but the patchseries got shot down because it didn't attempt to address NUMA / simulate the fact you can only add RAM one DIMM at a time / etc...

http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg02907.html

-- PMM

#2 lore raw
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

So, 128Mb is still a good default? I am just wondering if those
boards with little memory still are major user of QEMU? :)

Regards,
chenwj

Signature · 5 lines
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
#3 lore raw
Quoted 7 lines · 陳韋任 (Wei-Ren Chen)
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

Quoted 6 lines
Quoted 3 lines

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

So, 128Mb is still a good default? I am just wondering if those
boards with little memory still are major user of QEMU? :)

They may not be major but they're still in the codebase. You can't just arbitrarily break them -- you need to propose a path forward that doesn't do that.

-- PMM

#15 lore raw
In reply to Michael Tokarev
Quoted 7 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

Some distributions (eg ubuntu) had a local patch to increase this value, for years.

Out of interest, what do they change it too ?

Quoted 2 lines

Maybe it's time to increase the default RAM size a bit? Make it arch-specific if needs to be ?

As with pretty much all QEMU hardware defaults, the default RAM size is always going to be a tradeoff between compatibility and optimization for specific use case. I can understand that the current RAM setting is useless for pretty much all x86 currently shipping "retail" operating systems (ie the ubuntu, fedora, windows, etc of today), but that's not really the only thing to worry about when invoking QEMU. People invoking QEMU manually have to care about many other aspects of hardware configuration that are going to be OS specific.

I think rather than asking the narrow question of whether we need to increase the default RAM, we need to have a clear statement on what target the default QEMU machine setup is aiming at.

If answer to that is that we're aiming to offer parity with current state of the art desktop hardware specs, then clearly we should be changing the RAM and other aspects over time to keep up. But it could be that our aim is to just not change the default hardware ever and explicitly state that this is a job for a layer above QEMU to solve.

We've had similar requests periodically against libvirt to say we should default to hardware model XYZ, or hardware config ABC. In the end we've always pointed out that by changing the defaults you never really solve the problem - you are just moving the problem from one person to a different person. The concept of virtual hardware defaults is just impossible to get right, since this is fundamentally something that has a different answer for every OS out there.

This is what motivated the creation of the libosinfo project. It aims to provide a database of all the various OS specific metadata for use by such higher level tools, and API to query this database. Included in the metadata it maintains are the minimum, and recommended resource settings for RAM, CPU count and disk storage for that OS, recommended default hardware devices, location of ISO images / install trees, ISO image signatures, release/eol dates, and much more besides.

So now when anyone askes for a change in libvirt defaults we just tell them that the app using libvirt should be picking the OS specific settings from libosinfo or a similar kind of source. So far only the GNOME boxes app is using libosinfo, but I'm intending to make both virt-manager and OpenStack use it too.

NB libosinfo has no dependency on libvirt at all - its only dep is on GLib, so we can use GObject introspection to expose the library to many different languages.

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
#10 lore raw
In reply to Peter Maydell
Quoted 16 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

Quoted 5 lines

Some distributions (eg ubuntu) had a local patch to increase this value, for years.

Maybe it's time to increase the default RAM size a bit? Make it arch-specific if needs to be ?

Quoted 6 lines

I tried two years ago to get a 'default RAM size' parameter added to the QEMUMachine struct, but the patchseries got shot down because it didn't attempt to address NUMA / simulate the fact you can only add RAM one DIMM at a time / etc...

http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg02907.html

As so often, the better we wish we had is the enemy of the good we could have, if we weren't so pig-headed about it.

#4 lore raw
In reply to Peter Maydell
Quoted 12 lines · Peter Maydell
Quoted 11 lines · 陳韋任 (Wei-Ren Chen)
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

Quoted 6 lines
Quoted 2 lines

So, 128Mb is still a good default? I am just wondering if those
boards with little memory still are major user of QEMU? :)

They may not be major but they're still in the codebase. You can't just arbitrarily break them -- you need to propose a path forward that doesn't do that.

256 can be handled by most things. The powerpc, arm, and mips boards I use in aboriginal linux all handle 256 megs. (The main reason sh4 isn't a real platform is it's hardwired to 64 megs.)

(Sparc32 can handle 256 megs ram but crashes if you feed it too long a kernel command line.)

Rob

#5 lore raw
Quoted 14 lines · Rob Landley
Quoted 13 lines · Peter Maydell
Quoted 11 lines · 陳韋任 (Wei-Ren Chen)
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

So, 128Mb is still a good default? I am just wondering if those
boards with little memory still are major user of QEMU? :)

They may not be major but they're still in the codebase. You can't just arbitrarily break them -- you need to propose a path forward that doesn't do that.

256 can be handled by most things.

I'm going to take a wild guess that Windows 7 doesn't do any better in 256MB than it does with 128 :-)

-- PMM

#6 lore raw
Quoted 18 lines · Peter Maydell
Quoted 17 lines · Rob Landley
Quoted 16 lines · Peter Maydell
Quoted 13 lines · 陳韋任 (Wei-Ren Chen)
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

So, 128Mb is still a good default? I am just wondering if those
boards with little memory still are major user of QEMU? :)

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

They may not be major but they're still in the codebase. You can't just arbitrarily break them -- you need to propose a path forward that doesn't do that.

256 can be handled by most things.

I'm going to take a wild guess that Windows 7 doesn't do any better in 256MB than it does with 128 :-)

Indeed documented min requirements for Win7 are 2 GB on x86_64. In fact very few modern OS accept anything as low as 256 MB. If you want adefault that is suitable for anything mainstream then we're talking GB's not MB's.

Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
#7 lore raw
Quoted 3 lines · Daniel P. Berrange
Quoted 2 lines · Peter Maydell

I'm going to take a wild guess that Windows 7 doesn't do any better in 256MB than it does with 128 :-)

Actually it does. With 128Mb it crashes. With 256Mb it says it wants more memory.

/mjt

#8 lore raw
In reply to Peter Maydell
Quoted 19 lines · Peter Maydell
Quoted 2 lines · Rob Landley
Quoted 1 line · Peter Maydell

On 5 March 2013 14:07, 陳韋任 (Wei-Ren Chen)

<[email protected]>

Quoted 15 lines
Quoted 15 lines
Quoted 13 lines · wrote:
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

So, 128Mb is still a good default? I am just wondering if those
boards with little memory still are major user of QEMU? :)

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

They may not be major but they're still in the codebase. You can't just arbitrarily break them -- you need to propose a path forward that doesn't do that.

256 can be handled by most things.

I'm going to take a wild guess that Windows 7 doesn't do any better in 256MB than it does with 128 :-)

Who cares? I meant that I got 256 megs in an arm board, 256 megs in a mips board, 256 megs in a powerpc board, and 256 megs in a sparc board.

KVM is welcome to change its defaults however it likes. This is the qemu list.

Rob

#9 lore raw
Quoted 8 lines · Rob Landley
Quoted 5 lines · Peter Maydell
Quoted 1 line · Rob Landley

256 can be handled by most things.

I'm going to take a wild guess that Windows 7 doesn't do any better in 256MB than it does with 128 :-)

Quoted 5 lines

Who cares? I meant that I got 256 megs in an arm board, 256 megs in a mips board, 256 megs in a powerpc board, and 256 megs in a sparc board.

KVM is welcome to change its defaults however it likes. This is the qemu list.

KVM the kernel component doesn't manage default RAM size -- QEMU does. You would have the same problems running Windows 7 on a TCG QEMU, because there's only one place we set the default RAM size globally for all boards. This is purely a QEMU issue which we should fix. There's no point increasing our single default RAM size to 256 because that fixes nothing -- it is still too small to be a useful default for many boards.

-- PMM

#11 lore raw
In reply to Peter Maydell
Quoted 10 lines · Peter Maydell
Quoted 4 lines · Michael Tokarev

For many years, qemu defaults to 128Mb of guest RAM size. Today, this is just too small, and many OSes fails to boot with this size, more, they fail to produce any reasonable messages either (eg, windows7 just crashes at startup).

If you make the default bigger then some boards will crash or behave weirdly because they try to map more RAM in than will fit into the space for RAM in their address maps.

Quoted 7 lines
Quoted 5 lines

Some distributions (eg ubuntu) had a local patch to increase this value, for years.

Maybe it's time to increase the default RAM size a bit? Make it arch-specific if needs to be ?

I tried two years ago to get a 'default RAM size' parameter

I don't see that in this series. It's a maximum RAM size.

Anyway, there's no problem changing the default ram size (and making it per-board). The only requirement is that -M pc-1.4 and below continues to expose 128MB as the default.

It's not worth bike shedding over what the default should be for pc targets. 256 or 512 would be equally good defaults and either would be acceptable.

Regards,

Anthony Liguori

Quoted 7 lines

added to the QEMUMachine struct, but the patchseries got shot down because it didn't attempt to address NUMA / simulate the fact you can only add RAM one DIMM at a time / etc...

http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg02907.html

-- PMM

#12 lore raw

[Qemu-devel] propose to implement ower device

Hi, Anthony and all

By now all devices of QEMU do not have much more
power management consideration, for example, if
system do suspend, it will call all registered notifiers, this was loosely required, and the code to do power management state transition seems just do 'ugly emulation', rather than be conscious with whole system devices, same condition with reset(it has been embedded in DeviceClass, good!),
shutdown, in real world, commonly all devices' power are controlled by a power chip, then all power sequence can be done just issue commands to this chip.
so, I come across an idea to implement qdev'ed power device, and make all qdev struct of devices aware of self power management(add reset, suspend, shutdown ... filed for DeviceClass), this will bring tidy power management, and the emulation will more like what happened in real world.
Hope I've expressed my idea clearly, if you have any questions, let me know, if get your permission, I'll step ahead to do this power chip emulation work.

Thanks!

#13 lore raw

Re: [Qemu-devel] propose to implement ower device

Quoted 21 lines · li guang

Hi, Anthony and all

By now all devices of QEMU do not have much more
power management consideration, for example, if
system do suspend, it will call all registered notifiers, this was loosely required, and the code to do power management state transition seems just do 'ugly emulation', rather than be conscious with whole system devices, same condition with reset(it has been embedded in DeviceClass, good!),
shutdown, in real world, commonly all devices' power are controlled by a power chip, then all power sequence can be done just issue commands to this chip.
so, I come across an idea to implement qdev'ed power device, and make all qdev struct of devices aware of self power management(add reset, suspend, shutdown ... filed for DeviceClass), this will bring tidy power management, and the emulation will more like what happened in real world.
Hope I've expressed my idea clearly, if you have any questions, let me know, if get your permission, I'll step ahead to do this power chip emulation work.

Quoted 3 lines

Thanks!

Hi, Guang
it seems the mail was sent as a child mail of "Default guest RAM
size". The topic is interesting, suggest resend it.

Signature · 3 lines
Best Regards

Wenchao Xia
#14 lore raw

Re: [Qemu-devel] propose to implement ower device

Quoted 22 lines · 在 2013-03-07四的 21:41 +0800,Wenchao Xia写道:
Quoted 21 lines · li guang

Hi, Anthony and all

By now all devices of QEMU do not have much more
power management consideration, for example, if
system do suspend, it will call all registered notifiers, this was loosely required, and the code to do power management state transition seems just do 'ugly emulation', rather than be conscious with whole system devices, same condition with reset(it has been embedded in DeviceClass, good!),
shutdown, in real world, commonly all devices' power are controlled by a power chip, then all power sequence can be done just issue commands to this chip.
so, I come across an idea to implement qdev'ed power device, and make all qdev struct of devices aware of self power management(add reset, suspend, shutdown ... filed for DeviceClass), this will bring tidy power management, and the emulation will more like what happened in real world.
Hope I've expressed my idea clearly, if you have any questions, let me know, if get your permission, I'll step ahead to do this power chip emulation work.

Quoted 7 lines
Quoted 3 lines

Thanks!

Hi, Guang
it seems the mail was sent as a child mail of "Default guest RAM
size". The topic is interesting, suggest resend it.

OK