LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: nainaide

用preload大幅加速Gentoo

[复制链接]
发表于 2008-3-19 13:05:20 | 显示全部楼层
如果我记得没错,ubuntu用的是upstart
回复 支持 反对

使用道具 举报

发表于 2008-3-19 13:08:07 | 显示全部楼层
现在已经在用baselayout2.0.0了,用的是openrc overlay里的,启动和关机,以及网络的启动,关闭速度有了很大的提高。
不过模块加载的设置位置变了,换成是在/etc/conf.d/modules中设置。刚开始的时候没注意,发现无线的WEP加密用不了了,lsmod发现ieee80211_crypt_wep没加载才注意到的。
rc的设置也换到了/etc/rc.conf中。
/etc/conf.d/net中的格式有变化,原来是config_eth0=(" "," ")的,现在换成config_eth0=" " 了。
兼容baselayout1的init脚本
因为我hda的DMA是通过hdparm来启动的,所以我在/etc/rc.conf中设置rc_need="hdparm"这样在并行启动的时候就会在boot level的时候先运行hdparm,从而在fsck的时候hda的DMA就打开了。否则容易跳出hda的DMA没有启动的警告

真是爽就一个字。
回复 支持 反对

使用道具 举报

发表于 2008-3-19 14:26:34 | 显示全部楼层
preload是一个很小的程序,通过preload这个小家伙,可以让你经常使用的程序启动速度更快。而且,小家伙是自适应的,它可以检测用户使用的程序,分析数据,预测用户可能会打开的程序,然后把需要的二进制代码或依赖的东西预先调入内存,这样就可以快速启动了。比如我们经常打开的firefox。


刚在网络里搜了一下,有疑问,安全性好不好?允许它往内存里写东西,溢出就麻烦,内存机制是如何?占用与收回内存是杂样?
回复 支持 反对

使用道具 举报

发表于 2008-3-19 14:42:20 | 显示全部楼层
read the fine source code
回复 支持 反对

使用道具 举报

发表于 2008-3-19 20:31:26 | 显示全部楼层
我编译出错,baselayout-2.0.0出错:
make: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/temp'
make: *** No rule to make target `layout'.  Stop.
make: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/temp'
^[[31;01m*^[[0m
^[[31;01m*^[[0m ERROR: sys-apps/baselayout-2.0.0 failed.
^[[31;01m*^[[0m Call stack:
^[[31;01m*^[[0m               ebuild.sh, line   49:  Called pkg_preinst
^[[31;01m*^[[0m             environment, line 2174:  Called die
^[[31;01m*^[[0m The specific snippet of code:
^[[31;01m*^[[0m           emake -C "${T}" $(make_opts) DESTDIR="${ROOT}" layout || die "failed to layout filesystem";
^[[31;01m*^[[0m  The die message:
^[[31;01m*^[[0m   failed to layout filesystem
^[[31;01m*^[[0m
^[[31;01m*^[[0m If you need support, post the topmost build error, and the call stack if relevant.
^[[31;01m*^[[0m A complete build log is located at '/var/tmp/portage/sys-apps/baselayout-2.0.0/temp/build.log'.
^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/sys-apps/baselayout-2.0.0/temp/environment'.
^[[31;01m*^[[0m

这是错误怎么处理?
回复 支持 反对

使用道具 举报

发表于 2008-3-19 22:33:17 | 显示全部楼层
请把log贴全来,这样我是看不出来错在哪……
回复 支持 反对

使用道具 举报

发表于 2008-3-20 00:44:42 | 显示全部楼层
>>> Unpacking source...
>>> Unpacking baselayout-2.0.0.tar.bz2 to /var/tmp/portage/sys-apps/baselayout-2.0.0/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0 ...
make -C etc all
make -C share all
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc'
make -C env.d all
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share'
if test -d share.Linux ; then make -C share.Linux all ; fi
make[2]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/env.d'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/env.d'
if test -d env.d. ; then make -C env.d. all ; fi
make -C profile.d all
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share.Linux'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share.Linux'
make[2]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/profile.d'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/profile.d'
if test -d profile.d. ; then make -C profile.d. all ; fi
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc'
if test -d etc.Linux ; then make -C etc.Linux all ; fi
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux'
make -C modules.d all
make[2]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux/modules.d'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux/modules.d'
if test -d modules.d. ; then make -C modules.d. all ; fi
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux'
>>> Source compiled.
>>> Test phase [not enabled]: sys-apps/baselayout-2.0.0

>>> Install baselayout-2.0.0 into /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ category sys-apps
make -C etc install
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc'
make -C env.d install
make -C share install
make[2]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/env.d'
test -n /etc/env.d && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share'
test -n  && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image/
make -C profile.d install
make[2]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/profile.d'
test -n /etc/profile.d && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; done
for x in  ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; fi ; done
for x in  ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; fi ; done
for x in  ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//man$ext || exit $? ; \
        done
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share'
if test -d share.Linux ; then make -C share.Linux install ; fi
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d || exit $? ; done
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share.Linux'
test -n /usr/share/baselayout && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout
for x in  ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d || exit $? ; done
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d || exit $? ; done
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout || exit $? ; done
for x in 00basic ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d || exit $? ; done
for x in fstab issue.devfix group passwd ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout || exit $? ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d/$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d/$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d || exit $? ; fi ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d/$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d/$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d || exit $? ; fi ; done
for x in  ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d/$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d || exit $? ; fi ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout/$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout/$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout || exit $? ; fi ; done
for x in  ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d/$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d || exit $? ; fi ; done
for x in  ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout/$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout || exit $? ; fi ; done
for x in  ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d || exit $? ; done
for x in shadow ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout || exit $? ; done
for x in  ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d || exit $? ; done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d/man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/env.d/man$ext || exit $? ; \
        done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d/man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/profile.d/man$ext || exit $? ; \
        done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout/man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//usr/share/baselayout/man$ext || exit $? ; \
        done
make[2]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/env.d'
if test -d env.d. ; then make -C env.d. install ; fi
make[2]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc/profile.d'
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/share.Linux'
if test -d profile.d. ; then make -C profile.d. install ; fi
test -n /etc && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; done
for x in hosts networks profile protocols services shells ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; fi ; done
for x in  ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; fi ; done
for x in  ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/man$ext || exit $? ; \
        done
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc'
if test -d etc.Linux ; then make -C etc.Linux install ; fi
make[1]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux'
make -C modules.d install
make[2]: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux/modules.d'
test -n /etc/modules.d && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d || exit $? ; done
for x in  ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d || exit $? ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d/$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d/$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d || exit $? ; fi ; done
for x in aliases i386  ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d/$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d || exit $? ; fi ; done
for x in  ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d || exit $? ; done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d/man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/modules.d/man$ext || exit $? ; \
        done
make[2]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux/modules.d'
if test -d modules.d. ; then make -C modules.d. install ; fi
test -n /etc && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; done
for x in filesystems inputrc issue issue.logo ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; fi ; done
for x in sysctl.conf ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; fi ; done
for x in  ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc || exit $? ; done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//etc/man$ext || exit $? ; \
        done
make[1]: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/work/baselayout-2.0.0/etc.Linux'
test -n  && install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image/
for x in   ; do install -m 0755  $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; done
for x in  ; do install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; done
for x in  ; do if test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//$x ; then cat $x >> /var/tmp/portage/sys-apps/baselayout-2.0.0/image//$x || exit $? ; else install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; fi ; done
for x in  ; do if ! test -e /var/tmp/portage/sys-apps/baselayout-2.0.0/image//$x ; then install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; fi ; done
for x in  ; do install -m 0600 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image/ || exit $? ; done
for x in   ; do \
            ext=`echo $x | sed -e 's/^.*\\.//'` ; \
            install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image//man$ext || exit $? ; \
            install -m 0644 $x /var/tmp/portage/sys-apps/baselayout-2.0.0/image//man$ext || exit $? ; \
        done
# These dirs may not exist from prior versions
for x in  ; do \
                install -m 0755 -d /var/tmp/portage/sys-apps/baselayout-2.0.0/image/$x || exit $? ; \
                touch /var/tmp/portage/sys-apps/baselayout-2.0.0/image/$x/.keep || exit $? ; \
        done
>>> Completed installing baselayout-2.0.0 into /var/tmp/portage/sys-apps/baselayout-2.0.0/image/

make: Entering directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/temp'
make: *** No rule to make target `layout'.  Stop.
make: Leaving directory `/var/tmp/portage/sys-apps/baselayout-2.0.0/temp'
*
* ERROR: sys-apps/baselayout-2.0.0 failed.
* Call stack:
*               ebuild.sh, line   49:  Called pkg_preinst
*             environment, line 2174:  Called die
* The specific snippet of code:
*           emake -C "${T}" $(make_opts) DESTDIR="${ROOT}" layout || die "failed to layout filesystem";
*  The die message:
*   failed to layout filesystem
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-apps/baselayout-2.0.0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-apps/baselayout-2.0.0/temp/environment'.
*
回复 支持 反对

使用道具 举报

发表于 2008-3-20 00:49:05 | 显示全部楼层
我用USE="bootstrap build" emerge -av baselayout安装的,失败,但是如果直接emrege baselayout可以成功,但是不能重启,关机了,说找不到/sbin/rc,重新安装了1.21.11.1才正常进入系统
回复 支持 反对

使用道具 举报

发表于 2008-3-20 00:58:24 | 显示全部楼层
你用的是哪里的ebuild?
我用的是openrc里的baselayout-2.0.0,它会装上openrc-9999做为依赖,没有问题的。
回复 支持 反对

使用道具 举报

发表于 2008-3-20 07:06:29 | 显示全部楼层
$ emerge -s preload
Searching...
[ Results for search key : preload ]
[ Applications found : 1 ]

*  sys-apps/preload
      Latest version available: 0.4
      Latest version installed: [ Not Installed ]
      Size of files: 122 kB
      Homepage:      http://preload.sourceforge.net/
      Description:   preload is an adaptive readahead daemon.
      License:       GPL-2

应该就是这个吧?Sabayon 3.5 loop2已经可以找到了!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表