Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Xen Linode with Gentoo
PostPosted: Wed May 14, 2008 10:41 am 
Offline

Joined: Mon May 07, 2007 5:17 pm
Posts: 1
Website: http://www.rolandx.com
WLM: rolandxy@gmail.com
Hi, i just move to Xen, and after upgrade some packages of my installation with: emerge -avuND world, i just got this message:

* Messages for package sys-libs/glibc-2.6.1:

* You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS.
* This will result in a 50% performance penalty, which is probably not what you want.


so, i need to put that line in the make.conf:

CFLAGS="-O2 -march=i686 -pipe -mno-tls-direct-seg-refs"

and after that, run: emerge -ae world that has:

Total: 109 packages (109 reinstalls), Size of downloads: 11,046 kB


is that really needed? or is just something that will be done on the dom0 side?.


Top
   
 Post subject:
PostPosted: Wed May 14, 2008 10:58 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
Wow... Does that mean Gentoo Linodes will be twice as fast as any other distro, since I'm assuming the binaries aren't compiled with that option by default?


Top
   
 Post subject:
PostPosted: Wed May 14, 2008 11:49 am 
Offline
Senior Newbie

Joined: Tue Mar 11, 2008 4:08 pm
Posts: 8
Quote:
On 32-bit x86 platforms, Xen uses segmentation to provide protection of the memory used for the hypervisor. This results in some performance issues since wrap-around segments as used by glibc need expensive extra handling. For more information on how Xen uses segmentation, see XenSegments.

It is possible to rebuild glibc so that it only uses segments such that there is no performance penalty. To do this, you need to apply the patch below to the glibc sources and then rebuild glibc with the -mno-tls-direct-seg-refs option.

This patch is not needed for glibc-2.4. It automatically accesses the segments correctly when it detects that it is compiled with the -mno-tls-direct-seg-refs option.


http://wiki.xensource.com/xenwiki/XenSpecificGlibc


Top
   
 Post subject:
PostPosted: Wed May 14, 2008 12:47 pm 
Offline
Senior Member

Joined: Mon Jul 30, 2007 9:55 pm
Posts: 80
Interesting. The Gentoo Xen doc does say to rebuild world after adding this flag: http://www.gentoo.org/doc/en/xen-guide.xml

I also run Gentoo on my Linode... wondering, though, if I really want to do this. If anything, my system seems faster on Xen than it did on UML.

I did also change CFLAGS and MAKEOPTS for Xen, since we get Xeon processors, and more of them:

Code:
CFLAGS="-march=prescott ..."
MAKEOPTS="-j5"


Top
   
 Post subject:
PostPosted: Thu May 15, 2008 10:09 am 
Offline
Senior Member

Joined: Mon Jul 30, 2007 9:55 pm
Posts: 80
Well, I don't know that it was needed, or that it improved performance (things "feel" the same, and I was not motivated enough to take before and after benchmarks), but I did emerge -e world using these CFLAGS and MAKEOPTS:

Code:
CFLAGS="-march=prescott -fomit-frame-pointer -O2 -pipe -mno-tls-direct-seg-refs"
MAKEOPTS="-j5"


256 packages were rebuilt, I rebooted, and everything is fine. Anyway, posting this just to say it appears "safe" to do this.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group