All of lore.kernel.org
 help / color / mirror / Atom feed
* RAM allocation and miscellaneous questions
@ 2004-09-29  2:57 Paul Dorman
  2004-09-29  3:30 ` Mark A. Williamson
  2004-09-29  8:37 ` Keir Fraser
  0 siblings, 2 replies; 15+ messages in thread
From: Paul Dorman @ 2004-09-29  2:57 UTC (permalink / raw)
  To: xen-devel

Hi everyone,

I'm running 10 VMs now quite happily, using LVM2 with distinct storage areas 
for each VM filesystem.

I suspect I'll be able to run around 30 VMs on the dual xeon 2.8GHz machines 
successfully, but I'm wondering how to manage the RAM allocations for each. I 
calculate that each VM will have around 110MB RAM if I run that many, 
including a healthy amount of RAM for Dom-0. I am wondering how this can be 
enough for LAMP VMs. Some of the systems I'm running now don't seem to 
perform very well with less than 400MB of RAM, and I can only really do that 
if some kind soul fixes Xen so I can use the full 12GB capacity of my Xen 
servers (they have 4GB now -- no good wasting money!).

This is probably a stupid question, but can I allocate more RAM to each VM 
than arithmetic would suggest? Is there some kind of compression or COW that 
goes on in the Xen memory management code?

Would it be best to run one replicated MySQL server (or several with different 
versions) loaded into a VM on each physical machine, and have all the other 
machines use that over virtual network connections? I suppose this would be 
perfectly okay, and I could do the same with Apache too I guess. But as I am 
going to be migrating the sites from many real machines into Xen, splitting 
them up into individual site machines as I go (at the moment our servers can 
run many sites), it would take a lot of work to change their configuration so 
that they connected to a networked copy of MySQL or Apache rather than a 
local one.

Another option, and I'm thinking you are all going to say 'go for that one!', 
would be to use 64bit machines for our main cluster, perhaps just using the 
two dual Xeon machines I have now for development purposes. That way I could 
use lots of RAM and presumably load up even more VMs into each. If I go down 
this road, I'm wondering what kind of hardware I should get. Does Xen work 
well with Opterons? I'm an AMD fan and would be very happy to use them if I 
went for this option. I'm after inexpensive commodity servers, so if anyone 
has any recommendations (especially if you are in NZ or Australia), I'm all 
ears.

May I ask how much RAM I could use with a dual Opteron system in a sensible 
Xen configuration? What's been tested?

One final question: if I were to ask the directors of the company if they 
would be interested in sponsoring big memory on Xeon-based machines, what 
kind of commitment would we be talking about? It could be cheaper to do this 
than to buy a cluster of dual Opteron machines! I do realise though that the 
true impediment will probably be the amount of time you developers have, so 
I'll brace myself for disappointment! :o) 

Thanks everyone for your valuable time.

Regards,
Paul


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: RAM allocation and miscellaneous questions
@ 2004-09-29 11:12 Mat
  2004-09-30  8:26 ` Ian Pratt
  2004-09-30 13:26 ` Mark A. Williamson
  0 siblings, 2 replies; 15+ messages in thread
From: Mat @ 2004-09-29 11:12 UTC (permalink / raw)
  To: xen-devel

On September 29, 9:55 am Ian Pratt <Ian.Pratt@cl.cam.ac.uk> wrote:
> >  It certainly does Mark (help, that is). I would like to learn more
> >  about this balloon driver, which could make things very managable. Is
> >  there any documentation or tutorial-like info about?
>
> The balloon driver hasn't been forward ported from 2.4 to 2.6 --
> it's on the todo list (it'll probably work unmodified modulo
> changes to the way proc fs works).
>
For people that still use linux 2.4 (like me) is there a tutorial or some
documentation about the ballon driver ?
> >  I have been wondering why my Domain-0 machine hasn't been using swap!
> >  :o) So I should just dump that partition?
>
> If you've configured swap, domain 0 should be using just like any
> normal linux kernel. The balloon driver works in dom0 just like
> any other domain.
It seems logical, but due to the fact that only a few process are running
ind dom0, swap file don't need to be huge is it ?

>
> >  I suppose I'll have to be very rigorous when
> >  it comes to keeping that domain lean yes? (Especially as I only have
> >  4GB to play with!). Out side of basic OS functionality, are there any
> >  Xen or LVM2 related processes I have to account for when setting the
> >  amount of RAM I can use for Domain-0?
>
> -xen linux kernels don't have any special processes that take any
> noticeable extra resources.
>
> In domain 0 you'll have to worry about the footprint of xend, but
> it's not that big.
>
When starting with xen one or two month ago, i've created a dom0 with only
32 Mo of ram, and when i launched xend, it was so slow that i tought i had
a problem.
I didn't take time to investigate and didn't remember how much memory was
used and if the system was swaping or not.
I just have done a test now with my current xen putting 32768 Mo on xen
command line (not the kernel line in grub).
And the system booted a bit slower and i suspect that durring the launch of
xend it has done some swap.
free return this just after the boot :
mat@zeus:/$ free
             total       used       free     shared    buffers     cached
Mem:         32768      28572       4196          0          0       7172
-/+ buffers/cache:      21400      11368
Swap:       506008        312     505696

Having this process:
  207 ?        Ss     0:00 dhclient -e -pf /var/run/dhclient.eth0.pid -lf
/var/
  253 ?        Ss     0:00 /sbin/syslogd
  256 ?        Ss     0:00 /sbin/klogd
  261 ?        Ss     0:00 /usr/sbin/inetd
  268 ?        Ss     0:00 /usr/sbin/sshd
  274 ?        S      0:00 xfrd
  275 ?        S      0:00 python /usr/sbin/xend start
  288 ?        Ss     0:00 /usr/sbin/cron
  327 tty1     Ss+    0:00 /sbin/getty 38400 tty1
  328 tty2     Ss+    0:00 /sbin/getty 38400 tty2
  329 tty3     Ss+    0:00 /sbin/getty 38400 tty3
  330 tty4     Ss+    0:00 /sbin/getty 38400 tty4
  331 tty5     Ss+    0:00 /sbin/getty 38400 tty5
  332 tty6     Ss+    0:00 /sbin/getty 38400 tty6
  333 ?        Ss     0:00 sshd: mat [priv]
  335 ?        R      0:00 sshd: mat@pts/0
  336 pts/0    Ss     0:00 -bash
  344 pts/0    R+     0:00 ps ax

i guess i could reduce the number of getty and get rid of dhclient (the
adress of dom0 is a static one ...).

It was my 2cents thoughts ...
Matthieu


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

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

end of thread, other threads:[~2004-10-01 21:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-29  2:57 RAM allocation and miscellaneous questions Paul Dorman
2004-09-29  3:30 ` Mark A. Williamson
2004-09-29  4:57   ` Paul Dorman
2004-09-29  7:55     ` Ian Pratt
2004-09-29 12:26     ` Mark A. Williamson
2004-09-29  8:37 ` Keir Fraser
2004-09-29 19:16   ` Paul Dorman
2004-09-29 19:53     ` Ronald G. Minnich
2004-09-30  9:02     ` Keir Fraser
2004-10-01 21:20       ` Mike Brady
  -- strict thread matches above, loose matches on Subject: below --
2004-09-29 11:12 Mat
2004-09-30  8:26 ` Ian Pratt
2004-09-30 13:26 ` Mark A. Williamson
2004-09-30 20:21   ` Brian Wolfe
2004-09-30 20:24     ` Mark A. Williamson

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.