Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Neil Bothwick
On Sat, 16 Jul 2011 14:13:49 -0400, Michael Orlitzky wrote:

 CFLAGS=-march=native -O2 -pipe enables everything safe these days.

As long as you don't want the VM to be portable.


-- 
Neil Bothwick

Angular Momentum Makes The World Go 'Round


signature.asc
Description: PGP signature


Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Kfir Lavi
On Sat, Jul 16, 2011 at 9:13 PM, Michael Orlitzky mich...@orlitzky.comwrote:

 On 07/16/2011 09:54 AM, Kfir Lavi wrote:
  Hi,
  I'm creating a router based on Gentoo, that needs to run as a vm using
  qemu.
  The mother machine will be Core I7 4 cores.
  What cpu and CFLAGS should I use to get the best performance out of this
 vm?
 
  Thanks,
  Kfir

 CFLAGS=-march=native -O2 -pipe enables everything safe these days.

 Hi,
I think -march=native is a problem, as it will compile for my cpu.
Qemu has different CPU, and i would like to compile my code to suit the vm
environment
as close as possible.

Kfir


Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread dong l
qemu has an option `*qemu* -*cpu host` that will use the host cpu features*

2011/7/17 Kfir Lavi lavi.k...@gmail.com



 On Sat, Jul 16, 2011 at 9:13 PM, Michael Orlitzky mich...@orlitzky.comwrote:

 On 07/16/2011 09:54 AM, Kfir Lavi wrote:
  Hi,
  I'm creating a router based on Gentoo, that needs to run as a vm using
  qemu.
  The mother machine will be Core I7 4 cores.
  What cpu and CFLAGS should I use to get the best performance out of this
 vm?
 
  Thanks,
  Kfir

 CFLAGS=-march=native -O2 -pipe enables everything safe these days.

 Hi,
 I think -march=native is a problem, as it will compile for my cpu.
 Qemu has different CPU, and i would like to compile my code to suit the vm
 environment
 as close as possible.

 Kfir



Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Albert Hopkins


On Saturday, July 16 at 16:54 (+0300), Kfir Lavi said:


 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this vm?

A router is not going to be CPU-bound.  Should matter little either way.




Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Michael Mol
On Sun, Jul 17, 2011 at 8:02 AM, Albert Hopkins mar...@letterboxes.org wrote:
 On Saturday, July 16 at 16:54 (+0300), Kfir Lavi said:
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this vm?

 A router is not going to be CPU-bound.  Should matter little either way.

I agree it's not likely to matter significantly. In a VM environment,
though, it could conceivably be routing traffic between other VM
guests, and the nature of their locality could easily result in higher
traffic flows than you'd ever see running across a wire. Depends on
the use case, I imagine.

-- 
:wq



Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Stroller

On 17 July 2011, at 13:02, Albert Hopkins wrote:
 On Saturday, July 16 at 16:54 (+0300), Kfir Lavi said:
 
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this vm?
 
 A router is not going to be CPU-bound.  Should matter little either way.

A router is not going to be CPU-bound *on the most modern of hardware*, with no 
other load.

An old WRT54G will be CPU-bound on the latest high speed home connections (c 
40meg), and I have at least one older PC, maybe 10 years old, still in use, on 
which performance could be an issue.

Your statement may apply to Kfir's Core I7 system, but it one should be careful 
against making such bold statements, less words like not be misunderstood be 
to mean never.

Stroller.




Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Daniel da Veiga
On Sat, Jul 16, 2011 at 10:54, Kfir Lavi lavi.k...@gmail.com wrote:

 Hi,
 I'm creating a router based on Gentoo, that needs to run as a vm using
 qemu.
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this
 vm?


If you intend to run this VM on different hardware or distribute it in any
way (so you don't really know on what hardware it will run) your best bet is
to set a generic arch like i686 or lower, OR hope the VM is run on software
based emulation (slow) so you don't have to worry about what CPU is running
it.

From my experience with qemu, you'll have a lot of requirements too, like
bridging and kernel module for virtual interfaces (tun/tap).

Now, if this will run on your machine, with kqemu, you'll set march on your
guest  as your host is...

-- 
Daniel da Veiga


Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Kfir Lavi
On Sun, Jul 17, 2011 at 7:19 PM, Daniel da Veiga danieldave...@gmail.comwrote:

 On Sat, Jul 16, 2011 at 10:54, Kfir Lavi lavi.k...@gmail.com wrote:

 Hi,
 I'm creating a router based on Gentoo, that needs to run as a vm using
 qemu.
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this
 vm?


 If you intend to run this VM on different hardware or distribute it in any
 way (so you don't really know on what hardware it will run) your best bet is
 to set a generic arch like i686 or lower, OR hope the VM is run on software
 based emulation (slow) so you don't have to worry about what CPU is running
 it.

 From my experience with qemu, you'll have a lot of requirements too, like
 bridging and kernel module for virtual interfaces (tun/tap).

 Now, if this will run on your machine, with kqemu, you'll set march on your
 guest  as your host is...

 --
 Daniel da Veiga


I'll build each router for its box. I don't want to use i686 as I'll run
also on Atom, and this comp is really really slow with kvm support.

Kfir


Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-16 Thread Michael Orlitzky
On 07/16/2011 09:54 AM, Kfir Lavi wrote:
 Hi,
 I'm creating a router based on Gentoo, that needs to run as a vm using
 qemu.
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this vm?
 
 Thanks,
 Kfir

CFLAGS=-march=native -O2 -pipe enables everything safe these days.



Re: [gentoo-user] Best CFLAGS

2006-06-22 Thread Raymond Lewis Rebbeck
On Friday, 23 June 2006 9:04, Thiago Lüttig wrote:
 Hi folks, I have an Athlon XP 2600+ with 512MB of RAM and I was wondering
 about the best CFLAGS to make my executables run-like-hell :).
 Does anyone have a machine like this ?? I just can't stand windows XP
 anymore on my home box, but i want to put my future gentoo box run faster
 than a lightning(or something like that :]  )
 Thanx.

The best cflags are those on the safe cflags list at:

http://gentoo-wiki.com/Safe_Cflags

If you use stupid cflags you will most probably encounter serious breakage and 
simply be told to revert to the safe cflags and emerge world before you 
receive much help.

Packages that benefit greatly from certain cflags usually override your cflags 
with better ones in the ebuild. For example I believe xine-lib will force -O3 
regardless of what you specify in make.conf.

-- 
Raymond Lewis Rebbeck

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Best CFLAGS

2006-06-22 Thread ArYiX
2006/6/22, Thiago Lüttig [EMAIL PROTECTED]:

Hi folks, I have an Athlon XP 2600+ with 512MB of RAM and I was wondering about the best CFLAGS to make my executables run-like-hell :).Does anyone have a machine like this ?? I just can't stand windows XP anymore on my home box, but i want to put my future gentoo box run faster than a lightning(or something like that :] ) 
Thanx.


Best for what?


-march=athlon-xp -mtune=athlon-xp -O2 -pipe

is safe and give you a great performance

i use thisCFLAGSfor a similar machine Athlon XP 2600 (core Barton)--aryix


Re: [gentoo-user] Best CFLAGS

2006-06-22 Thread Teresa and Dale
ArYiX wrote:

 2006/6/22, Thiago Lüttig [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

 Hi folks, I have an Athlon XP 2600+ with 512MB of RAM and I was
 wondering about the best CFLAGS to make my executables
 run-like-hell :).
 Does anyone have a machine like this ?? I just can't stand windows
 XP anymore on my home box, but i want to put my future gentoo box
 run faster than a lightning(or something like that :]  )
 Thanx.

  
  
 Best for what?
  
  
 -march=athlon-xp -mtune=athlon-xp -O2 -pipe
  
 is safe and give you a great performance
  
 i use this CFLAGS for a similar machine Athlon XP 2600 (core Barton)

 --aryix


I have been using this one for quite a while now and no problems yet anyway.

 CFLAGS=-march=athlon-xp -O2 -fomit-frame-pointer
 -momit-leaf-frame-pointer -fno-ident -pipe


I got it from here: 
http://forums.gentoo.org/viewtopic-p-2314776.html#2314776  We have
pretty similiar rigs.  AMD 2500+ with 1GB of ram. 

Hope that helps

Dale
:-)  :-)

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Best CFLAGS

2006-06-22 Thread Hemmann, Volker Armin
On Friday 23 June 2006 02:20, ArYiX wrote:
 2006/6/22, Thiago Lüttig [EMAIL PROTECTED]:
  Hi folks, I have an Athlon XP 2600+ with 512MB of RAM and I was wondering
  about the best CFLAGS to make my executables run-like-hell :).
  Does anyone have a machine like this ?? I just can't stand windows XP
  anymore on my home box, but i want to put my future gentoo box run faster
  than a lightning(or something like that :]  )
  Thanx.

 Best for what?


 -march=athlon-xp -mtune=athlon-xp -O2 -pipe

 is safe and give you a great performance

tröööt.

If you use march, mtune is superflous ;)

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Best CFLAGS

2006-06-22 Thread Graham Murray
Hemmann, Volker Armin [EMAIL PROTECTED] writes:

 If you use march, mtune is superflous ;)

Except for builds which override -march but do not touch -mtune.
-- 
gentoo-user@gentoo.org mailing list