Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Virtual Private Servers (VPS) with Gentoo guests
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gmtl3
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2004
Posts: 135

PostPosted: Tue Aug 08, 2006 8:45 pm    Post subject: Virtual Private Servers (VPS) with Gentoo guests Reply with quote

Hi all. I'd like to start some discussion around virtual private server farms with something like Xen and using Gentoo as a VPS guest operating system. I have a friend who's running such a business and I've been helping him out/using his service by having a VPS server in his environment running Gentoo. I also have a Xen VPS from another source running Debian Linux. What's interesting to me is that I got a basic Debin stable load in about 200 - 250 MB, and my gentoo VPS is right now about 2.4 GB. That 2.4 GB is with /usr/portage being about 661 MB and /var/tmp/portage being about 561 MB, and I am in the middle of an emerge -uND world so there's really nothing much I can do to change /var/tmp/portage right now etc. To be fair, the Debian load is pretty stripped down, so my install base may be closer to 800 - 1000 MB when it's got an install that resembles the Gentoo installation, but the largest amounts of disk space don't seem to be chewed up by areas like /usr/bin, /usr/sbin, and /opt/[s]bin/

The reason I'm asking this question is Gentoo is my preferred distro of choice, but a lot of VPS packages offered out there in the $20/month and under range offer plenty of RAM, monthly bandwidth, and CPU time slices to give me what I need, but don't offer enough disk space to accomodate Gentoo. Set aside for a second the ~ 700MB and growing need for /usr/portage and the 1GB+ needed for /var/tmp/portage (gcc takes at least 700MB to compile), and you still have the Debian system taking ~ 30 MB for /usr/lib and Gentoo taking almost 400MB for /usr/lib32 and /usr/lib64 (gentoo system is AMD 64 CPU). It appears to be an orders of magnitude difference in disk spacer equirements.

I just have some general questions that hope can be answered or at least will generate some discussion.

1. Is Gentoo a suitable distro for being a VPS guest (or can it be)?
2. What kinds of things can be done to reduce the disk footprint needed.
-> An obvious example is making a common read-only /usr/portage that can be mounted by all guests, but /usr/portage distfiles needs to be writeable by each VPS. Is there a way to faciliate this?
-> It would also help if there was a single large disk repository that could be mounted under /var/tmp/portage, but how could the provider keep guest admins from abusing that disk space to put data there not intended to be temporary?
-> What can be done to reduce the size of /usr/lib* and other critical areas of the file system that seem to be extremely large compared to other distrobutions?
3. Does anyone have any experience with using Gentoo in this type of space? If so, andy insights to share?

Thanks,
Back to top
View user's profile Send private message
roock
n00b
n00b


Joined: 06 Feb 2003
Posts: 32
Location: Korneuburg, Austria

PostPosted: Thu Aug 31, 2006 10:26 am    Post subject: Reply with quote

I can only reply to some questions:

1. If you like gentoo - it is of course suitable. I'm using Xen for hosting serveral different server on one server.
2. you can use a read-only /usr/portage over nfs, and use a rw /usr/portage/distfiles between all vps. works perfectly. Of course users *could* use this place for sotring their data -. but then all users of other VPS can also see this data....
I cannot say anything to your /usr problem. But a sample /usr on one server is about 550 MB, but has apache/mysql/php4/5/postfix and so on installed - so I don't think this is really much. Maybe this is a problem when using 64-bit? I didn't use any 64-bit up to now.
Back to top
View user's profile Send private message
gmtl3
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2004
Posts: 135

PostPosted: Thu Aug 31, 2006 11:01 am    Post subject: Reply with quote

How does that work, having a nfs mounted /usr/portage, and a local mounted rw /usr/portage/distfiles?

Does any of the guests need to run emerge --sync, or only once per /usr/portage?

Thanks,
Back to top
View user's profile Send private message
roock
n00b
n00b


Joined: 06 Feb 2003
Posts: 32
Location: Korneuburg, Austria

PostPosted: Thu Aug 31, 2006 5:47 pm    Post subject: Reply with quote

gmtl3 wrote:
How does that work, having a nfs mounted /usr/portage, and a local mounted rw /usr/portage/distfiles?


No, I have both, /usr/portage and /usr/portage/distfiles mounted via nfs/ exported via nfs.

my fstab of one server:
remote:/usr/portage /usr/portage nfs ro
remote:/usr/portage/distfiles /usr/portage/distfiles nfs rw

gmtl3 wrote:

Does any of the guests need to run emerge --sync, or only once per /usr/portage?


No, it is enogh to run "emerge --metadata" to update portage cache on all servers (I don't know what thsi actually does, but it is recommended). You need to run emerge --sync only once.
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Thu Aug 31, 2006 8:20 pm    Post subject: Reply with quote

another option is to create a package farm. Since all the gentoo systems are running the same hardware, just create another nfs share of binary packages that have already been compiled. Things like apache, php, and mysql should be pretty standard. I guess you would have to worry about use flags though ...

I just started getting into Xen, and was looking to do a similiar nfs mounted portage tree and distfile. The good thing about the nfs mounted distfile is the reduce load on mirrors and your bandwidth. Again common packages like apache would of already been downloaded
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
RioFL
Guru
Guru


Joined: 31 Oct 2002
Posts: 407

PostPosted: Thu Jun 21, 2007 12:23 am    Post subject: Reply with quote

Linux-Vserver works incredibly well and is fully supported by Gentoo. Portage has vserver utilities and kernels available.

http://linux-vserver.org/Welcome_to_Linux-VServer.org

we have 3 host servers each running more than 40 virtual servers and we have literally no hiccups at all with gentoo. Gentoo is the host o/s and 90% of the guest o/s, the rest being centos because a certain application requires it. you can run almost any linux distro as a vserver or host.

what they do is bind mount each gentoo guest to the host portage and distfiles directories, the host does a sync once a day and the guests can do emerge --metadata to update their own caches. the entire portage tree is not a part of the disk space used in each vserver. the unique packages per server that may be needed are downloaded to the common portage distfiles making it available to any other guest that may choose to use it.

most of my virtuals use around 600mb disk space and even less if i used the tools they supply for hard linking to executables.

i realize this is almost a year later than these posts, but linux-vserver is, in my opinion, the most efficient of all the virtual systems out there.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum