Virtual Guru's Blog – Home of Virtualization Workshops

October 27, 2010

12minutes: Chromium OS FAQ: Building (Compiling) of Chromium OS is SLOW !!!

Filed under: 12minutes, best_practices, ChromeOS — Tags: , — natiku @ 6:23 pm

12 Minutes: Chromium OS Based on discussion in chromium-os-discuss some tips how to debug Chromium OS Building (Compiling) seed !!!.

Issue:

Peoples perceive then Building (Compiling) of Chromium OS is SLOW !!!.

Answer:

Generally IDEALLY you need for smooth compiling of Chromium OS good Internet connection, Powerful 64bit CPU and Lot of Memory (+ fast disk) 🙂 .

So check:
– If your Internet connection is not heavily shared shared during building (for download of sources)
– If your CPU is not loaded with other tasks (like running Desktop GUI)
– If your Memory is not occupied with other (like running Desktop GUI)

You can monitor CPU and MEMORY usage during compiling form another terminal with command top and also add –showoutput to see what happen during build process or you can use pstree command, see bellow:

ps -C build_packages
  PID TTY          TIME CMD
 14787 pts/0    00:00:00 build_packages

pstree -l -a -A 14787
build_packages ./build_packages --nowithautotest --nowithtest
  `-parallel_emerge /home/chronocb/trunk/src/scripts/parallel_emerge --board=x86-generic -uDNv --getbinpkg --usepkg 
        --with-bdeps y --rebuild chromeos-base/chromeos chromeos-base/chromeos-dev chromeos-base/chromeos-factoryinstall
      |-parallel_emerge /home/chronocb/trunk/src/scripts/parallel_emerge --board=x86-generic -uDNv --getbinpkg --usepkg 
        --with-bdeps y --rebuild chromeos-base/chromeos chromeos-base/chromeos-dev chromeos-base/chromeos-factoryinstall
      |   |-sandbox "/usr/lib64/portage/bin/ebuild.sh" unpack
      |   |   `-ebuild.sh /usr/lib64/portage/bin/ebuild.sh unpack
      |   |       `-ebuild.sh /usr/lib64/portage/bin/ebuild.sh unpack
      |   |           `-git clone --bare http://git.chromium.org/git/kernel /var/lib/portage/distfiles-target/git-src/kernel
      |   |               `-git-remote-http origin http://git.chromium.org/git/kernel
      |   |                   `-git fetch-pack --stateless-rpc --lock-pack --thin http://git.chromium.org/git/kernel/  efs/heads/0.7.48.B  
                  ... efs/tags/nvidia-9.12.11
      |   |                       `-git index-pack --stdin -v --fix-thin --keep=fetch-pack 16240 on atomd510 --pack_header=2,1729166
      |   `-{parallel_emerg}
      |-parallel_emerge /home/chronocb/trunk/src/scripts/parallel_emerge --board=x86-generic -uDNv --getbinpkg --usepkg
         --with-bdeps y --rebuild chromeos-base/chromeos chromeos-base/chromeos-dev chromeos-base/chromeos-factoryinstall
      |   `-{parallel_emerg}
      |-parallel_emerge /home/chronocb/trunk/src/scripts/parallel_emerge --board=x86-generic -uDNv --getbinpkg --usepkg 
         --with-bdeps y --rebuild chromeos-base/chromeos chromeos-base/chromeos-dev chromeos-base/chromeos-factoryinstall
      |   |-sandbox "/usr/lib64/portage/bin/ebuild.sh" unpack
      |   |   `-ebuild.sh /usr/lib64/portage/bin/ebuild.sh unpack
      |   |       `-ebuild.sh /usr/lib64/portage/bin/ebuild.sh unpack
      |   |           `-git clone --bare http://git.chromium.org/git/kernel /var/lib/portage/distfiles-target/git-src/perf
      |   |               `-git-remote-http origin http://git.chromium.org/git/kernel
      |   |                   `-git fetch-pack --stateless-rpc --lock-pack --thin http://git.chromium.org/git/kernel/  efs/head/0.7.48.B 
           ... efs/tags/nvidia-9.12.11
      |   |                       `-git index-pack --stdin -v --fix-thin --keep=fetch-pack 18484 on atomd510 --pack_header=2,1729166
      |   `-{parallel_emerg}
      |-parallel_emerge /home/chronocb/trunk/src/scripts/parallel_emerge --board=x86-generic -uDNv --getbinpkg --usepkg 
          --with-bdeps y --rebuild chromeos-base/chromeos chromeos-base/chromeos-dev chromeos-base/chromeos-factoryinstall
      |   `-{parallel_emerg}
      |-parallel_emerge /home/chronocb/trunk/src/scripts/parallel_emerge --board=x86-generic -uDNv --getbinpkg --usepkg 
         --with-bdeps y --rebuild chromeos-base/chromeos chromeos-base/chromeos-dev chromeos-base/chromeos-factoryinstall
      `-4*[{parallel_emerg}]

Most issues are with Memory and Swapping when you for example try to compile on system with just 1GB of RAM running building process in GUI (X) having only couple of 100MB free memory.

You can try to get more resources for example by compiling in true text mode to get rid of GUI load OR to lower load compiling is generating to your system to prevent swapping (for example if you CPU have 4 logical units, fast mode will generate load of 4 tasks in parallel , adding –jobs=2 will allow only 2 tasks at once)

Fore some time –fast is now default, you can check it with ./build_packages –help and see if fast is still true by default.

You can also try to minimize number of packages/tasks needed to process with:

(chroot) $ USE="-build_tests" ./build_packages --nowithtest --nowithautotest ...

I make some measurements for my ATOM based systems with has only decent power (Single Core/1GB RAM and Double Core/2GB RAM ones) so you can compare with your system:

Building Chromium OS image in 12 steps on ATOM nettop HW using REPO

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: