Re: [gentoo-user] Emerging package via NFS ?

2010-12-20 Thread Thomas Drueke
Hi,

just to let you know that approach below works for me.

I modified it slightly in that I add

mount --bind /usr/portage /mnt/other/usr/portage

to belows cmd list as machine A and B will always be synchronized.

Thanks a lot,
Thomas

Am 15.12.2010 10:56, schrieb YoYo Siska:
 On Wed, Dec 15, 2010 at 10:15:12AM +0100, Thomas Drueke wrote:
 Hi,

 is it possible to emerge packages to a $ROOT directory mounted via NFS ?

 The setup is
 - machine A is equipped with a Quad core CPU
 - machine B is equipped with an N330 Atom-CPU
 - machine A is doing the system update on a local chroot-environment
   for machine B and generates binary packages. These packages are
   installed on machine B using the binary package feature of portage.

 I expected that the above setup would give an performance improvement
 over letting machine B do the portage update itself. However a trial run
 did not show significant improvement that justifies the effort. Machine
 B still needs a reasonable amount of time to fetch unpack and install
 the packages.

 An alternative way might be to mount machine B's / directory via NFS
 and change make.conf's $ROOT variable to that mount point.

 Does that sound as a reasonable approach ?
 
 I had a very old machine, that was really slow. Compiles could be
 offloaded by distcc, but even the ./configure-s and portage stuff
 (checking, upacking, ...) was reaaly slow...
 
 So I just used to export / through nfs, mounted it on a fast amd64  and
 basically did (other is the slow machine)
 
 mount other:/ /mnt/other
 mount -t proc proc /mnt/other/proc
 mount --bind /dev /mnt/other/dev
 mkdir /tmp/other
 mount --bind /tmp/other /mnt/other/var/tmp/portage
 mkdir /home/gentoo-other 
 mount --bind /home/gentoo-other /mnt/other/home/gentoo
 
 linux32 chroot /mnt/other /bin/bash
 emerge.
 
 For the last mkdir/mount, I have DISTDIR=/home/gentoo/distfiles and
 PKGDIR=/home/gentoo/packages in make.conf, you can do that with the
 standart /usr/portage/{distfiles,packages}
 
 This way most of the compile is done localy on the fast machine.
 yoyo
 
 

 Regards,
 Thomas

 
 
 
 



[gentoo-user] Emerging package via NFS ?

2010-12-15 Thread Thomas Drueke
Hi,

is it possible to emerge packages to a $ROOT directory mounted via NFS ?

The setup is
- machine A is equipped with a Quad core CPU
- machine B is equipped with an N330 Atom-CPU
- machine A is doing the system update on a local chroot-environment
  for machine B and generates binary packages. These packages are
  installed on machine B using the binary package feature of portage.

I expected that the above setup would give an performance improvement
over letting machine B do the portage update itself. However a trial run
did not show significant improvement that justifies the effort. Machine
B still needs a reasonable amount of time to fetch unpack and install
the packages.

An alternative way might be to mount machine B's / directory via NFS
and change make.conf's $ROOT variable to that mount point.

Does that sound as a reasonable approach ?

Regards,
Thomas



Re: [gentoo-user] Emerging package via NFS ?

2010-12-15 Thread YoYo Siska
On Wed, Dec 15, 2010 at 10:15:12AM +0100, Thomas Drueke wrote:
 Hi,
 
 is it possible to emerge packages to a $ROOT directory mounted via NFS ?
 
 The setup is
 - machine A is equipped with a Quad core CPU
 - machine B is equipped with an N330 Atom-CPU
 - machine A is doing the system update on a local chroot-environment
   for machine B and generates binary packages. These packages are
   installed on machine B using the binary package feature of portage.
 
 I expected that the above setup would give an performance improvement
 over letting machine B do the portage update itself. However a trial run
 did not show significant improvement that justifies the effort. Machine
 B still needs a reasonable amount of time to fetch unpack and install
 the packages.
 
 An alternative way might be to mount machine B's / directory via NFS
 and change make.conf's $ROOT variable to that mount point.
 
 Does that sound as a reasonable approach ?

I had a very old machine, that was really slow. Compiles could be
offloaded by distcc, but even the ./configure-s and portage stuff
(checking, upacking, ...) was reaaly slow...

So I just used to export / through nfs, mounted it on a fast amd64  and
basically did (other is the slow machine)

mount other:/ /mnt/other
mount -t proc proc /mnt/other/proc
mount --bind /dev /mnt/other/dev
mkdir /tmp/other
mount --bind /tmp/other /mnt/other/var/tmp/portage
mkdir /home/gentoo-other 
mount --bind /home/gentoo-other /mnt/other/home/gentoo

linux32 chroot /mnt/other /bin/bash
emerge.

For the last mkdir/mount, I have DISTDIR=/home/gentoo/distfiles and
PKGDIR=/home/gentoo/packages in make.conf, you can do that with the
standart /usr/portage/{distfiles,packages}

This way most of the compile is done localy on the fast machine.
yoyo


 
 Regards,
 Thomas
 





Re: [gentoo-user] Emerging package via NFS ?

2010-12-15 Thread Thomas Drueke
Interesting approach. I'll give that a try.

Thanks,
Thomas

Am 15.12.2010 10:56, schrieb YoYo Siska:
 On Wed, Dec 15, 2010 at 10:15:12AM +0100, Thomas Drueke wrote:
 Hi,

 is it possible to emerge packages to a $ROOT directory mounted via NFS ?

 The setup is
 - machine A is equipped with a Quad core CPU
 - machine B is equipped with an N330 Atom-CPU
 - machine A is doing the system update on a local chroot-environment
   for machine B and generates binary packages. These packages are
   installed on machine B using the binary package feature of portage.

 I expected that the above setup would give an performance improvement
 over letting machine B do the portage update itself. However a trial run
 did not show significant improvement that justifies the effort. Machine
 B still needs a reasonable amount of time to fetch unpack and install
 the packages.

 An alternative way might be to mount machine B's / directory via NFS
 and change make.conf's $ROOT variable to that mount point.

 Does that sound as a reasonable approach ?
 
 I had a very old machine, that was really slow. Compiles could be
 offloaded by distcc, but even the ./configure-s and portage stuff
 (checking, upacking, ...) was reaaly slow...
 
 So I just used to export / through nfs, mounted it on a fast amd64  and
 basically did (other is the slow machine)
 
 mount other:/ /mnt/other
 mount -t proc proc /mnt/other/proc
 mount --bind /dev /mnt/other/dev
 mkdir /tmp/other
 mount --bind /tmp/other /mnt/other/var/tmp/portage
 mkdir /home/gentoo-other 
 mount --bind /home/gentoo-other /mnt/other/home/gentoo
 
 linux32 chroot /mnt/other /bin/bash
 emerge.
 
 For the last mkdir/mount, I have DISTDIR=/home/gentoo/distfiles and
 PKGDIR=/home/gentoo/packages in make.conf, you can do that with the
 standart /usr/portage/{distfiles,packages}
 
 This way most of the compile is done localy on the fast machine.
 yoyo
 
 

 Regards,
 Thomas

 
 
 
 



Re: [gentoo-user] Emerging package via NFS ?

2010-12-15 Thread William Kenworthy
Yes, I have a N330 (zotec ION) with 3G ram, no local storage and swap
over nbd with portage and build area in /tmp which itself is on tmpfs.

Some packages (gcc and glibc in particular) require a lot of ram and
tmpfs to emerge so sometimes I have to disable tmpfs and use nfs
storage.

Because portage is lost on reboot when using tmpfs, an emerge sync is
needed to rebuild it when an update is needed and that takes time (more
than just updating portage over nfs in fact).  The upside is emerges can
be very fast indeed and updating portage is an unattended operation so
cost (admin time) is small for me.

Only disadvantage is gcc and possibly gcc need manual intervention to
disable tmpfs but thats not often - if you dont mind the wasted disk
space (portage) you can avoid the sync time, but having the build
directories in tmpfs is a real gain - wish I had the max of 4G though :)

BillK

myth2 linux # df -h
FilesystemSize  Used Avail Use% Mounted on
devtmpfs  878M   72K  878M   1% /dev
shm   878M 0  878M   0% /dev/shm
tmpfs 1.8G  492M  1.3G  29% /tmp
tmpfs  10M 0   10M   0% /var/lock
tmpfs  10M   64K   10M   1% /var/run
tmpfs  10M  320K  9.7M   4% /var/cache/hald
svcdir2.0M  208K  1.8M  11% /var/lib/init.d
myth1:/home/MythTV/videos
  1.2T  960G  251G  80% /mnt/videos
myth1:/home/MythTV/posters
  1.2T  960G  251G  80% /mnt/posters
myth1:/home/MythTV/recordings
  1.2T  960G  251G  80% /mnt/recordings
myth1:/home/MythTV/music
  1.2T  960G  251G  80% /mnt/music
myth1:/home/MythTV/gallery
  1.2T  960G  251G  80% /mnt/gallery
myth2 linux # swapon -s
FilenameTypeSizeUsed
Priority
/dev/nbd0   partition   2097148 0
-1
myth2 linux # 



On Wed, 2010-12-15 at 10:15 +0100, Thomas Drueke wrote:
 Hi,
 
 is it possible to emerge packages to a $ROOT directory mounted via NFS ?
 
 The setup is
 - machine A is equipped with a Quad core CPU
 - machine B is equipped with an N330 Atom-CPU
 - machine A is doing the system update on a local chroot-environment
   for machine B and generates binary packages. These packages are
   installed on machine B using the binary package feature of portage.
 
 I expected that the above setup would give an performance improvement
 over letting machine B do the portage update itself. However a trial run
 did not show significant improvement that justifies the effort. Machine
 B still needs a reasonable amount of time to fetch unpack and install
 the packages.
 
 An alternative way might be to mount machine B's / directory via NFS
 and change make.conf's $ROOT variable to that mount point.
 
 Does that sound as a reasonable approach ?
 
 Regards,
 Thomas
 

-- 
William Kenworthy bi...@iinet.net.au
Home in Perth!