希赛网 · 知识导航 常识网:理财知识库和投资理财服务平台
 
    Linux教程    Unix教程    Solaris教程    AIX教程    Linux系统管理    Linux编程 Shell Perl    Linux内核技术    Linux服务器    Linux集群    Linux安全  
希赛网 > 操作系统 > Linux教程 > 使用Preload 给Ubuntu 9.04 系统加速

使用Preload 给Ubuntu 9.04 系统加速

发布者:yiyickf   来源:互联网   发布日期:2014年08月08日   Linux学习交流群:207858983

  本教程旨在说明如何在 Ubuntu 9.04 系统上安装 Preload ,并使用它为系统提速。Preload 是一个自适应预读守护进程。它监控用户运行的应用程序,并且分析这些数据,预测用户可能运行的程序,并读取这些程序的二进制文件及其依赖文件到系统内存,以达到加速启动的时间。

  本文当不做任何形式的担保!我不保证它能在你的系统上正常工作!

  安装 Preload

  要安装 Preload ,首先打开终端 (应用程序/附件/终端),然后输入:

  sudo aptitude install preload

  来安装 Preload 。

  

  安装完成。Preload 将在后台静静运行。如果你想改变 Preload 的行为,你可以编辑它的配置文件 /etc/nf 。这是它的默认配置:

  sudo gedit /etc/nf

  [model]

  # cycle:
#
# This is the quantum of time for preload. Preload performs
# data gathering and predictions every cycle. Use an even
# number.
#
# Note: Setting this parameter too low will may reduce the
# system performance and stability.
#
# unit: seconds
# default: 20
#
cycle = 20

  # usecorrelation:
#
# Whether correlation coefficient should be used in the prediction
# algorithm. There are arguments both for and against using it.
# Currently it’s believed that using it results in more accurate
# prediction. The option may be removed in the future.
#
# default: true
usecorrelation = true

  # minsize:
#
# Minimum sum of the length of maps of the process for
# preload to consider tracking the application.
#
# Note: Setting this parameter too high will make preload less
# effective, while setting it too low will make it eat
# quadratically more resources, as it tracks more processes.
#
# unit: bytes
# default: 2000000
#
minsize = 2000000

  #
# The following control how much memory preload is allowed to use
# for preloading in each cycle. All values are percentages and are
# clamped to -100 to 100.
#
# The total memory preload uses for prefetching is then computed using
# the following formulae:
#
# max (0, TOTAL * memtotal + FREE * memfree) + CHACED * memcached
# where TOTAL, FREE, and CACHED are the respective values read at
# runtime from /proc/meminfo.
#

  # memtotal: precentage of total memory
#
# unit: signed_integer_percent
# default: -10
#
memtotal = -10

  # memfree: precentage of free memory
#
# unit: signed_integer_percent
# default: 100
#
memfree = 100

  # memcached: precentage of cached memory
#
# unit: signed_integer_percent
# default: 30
#
memcached = 30

  ###########################################################################

  [system]

  # doscan:
#
# Whether preload should monitor running processes and update its
# model state. Normally you do want that, that’s all preload is
# about, but you may temporarily want to turn it off for various
# reasons like testing and only make predictions. Note that if
# scanning is off, predictions are made based on whatever processes
# have been running when preload started and the list of running
# processes is not updated at all.
#
# default: true
doscan = true

  # dopredict:
#
# Whether preload should make prediction and prefetch anything off
# the disk. Quite like doscan, you normally want that, that’s the
# other half of what preload is about, but you may temporarily want
# to turn it off, to only train the model for example. Note that
# this allows you to turn scan/predict or or off on the fly, by
# modifying the config file and signalling the daemon.
#
# default: true
dopredict = true

  # autosave:
#
# Preload will automatically save the state to disk every
# autosave period. This is only relevant if doscan is set to true.
# Note that some janitory work on the model, like removing entries
# for files that no longer exist happen at state save time. So,
# turning off autosave completely is not advised.
#
# unit: seconds
# default: 3600
#
autosave = 3600

  # mapprefix:
#
# A list of path prefixes that controll which mapped file are to
# be considered by preload and which not. The list items are
# separated by semicolons. Matching will be stopped as soon as
# the first item is matched. For each item, if item appears at
# the beginning of the path of the file, then a match occurs, and
# the file is accepted. If on the other hand, the item has a
# exclamation mark as its first character, then the rest of the
# item is considered, and if a match happens, the file is rejected.
# For example a value of !/lib/modules;/ means that every file other
# than those in /lib/modules should be accepted. In this case, the
# trailing item can be removed, since if no match occurs, the file is
# accepted. It’s advised to make sure /dev is rejected, since
# preload doesn’t special-handle device files internally.
#
# default: (empty list, accept all)
mapprefix = /usr;/lib;!/

  # exeprefix:
#
# The syntax for this is exactly the same as for mapprefix. The only
# difference is that this is used to accept or reject binary exectuable
# files instead of maps.
#
# default: (empty list, accept all)
exeprefix = !/usr/sbin;!/usr/local/sbin;/usr;!/

  如果你更改了配置,你需要重启 Preload :

  sudo /etc/init.d/preload restart

  链接


preload:
Ubuntu:

  翻译自 Speed Up Your System With Preload On Ubuntu 9.04 ,不保证翻译的准确性,请查看原文。

  本文来自:; 转载请注明出处

1 2

更多>>热门试卷

更多>>最新视频

更多>>热门阅读

全局导航
IT认证学院
Adobe认证Cisco认证H3C认证IBM认证IT认证资讯Java认证Linux认证Microsoft认证Oracle认证华为认证
IT英语
IT新技术操作系统基础英语计算机网络软件工程软考英语数据库系统通信专业英语项目管理英语应用系统硬件数码职场英语
程序开发学院
.NETC语言_C++语言DelphiPowerBuilderWeb开发嵌入式开发移动开发游戏开发PHPPythonPerlRuby
等考学院
考试大纲二级考试经验二级模拟试题一级考试资料二级考试资料一级模拟试题三级模拟试题四级模拟试题一级考试经验三级考试经验四级考试经验四级考试资料三级考试资料等级考试动态
软件工程学院
CASE工具构件与中间件软件测试软件过程改进软件设计软件外包需求分析软件质量保证系统分析与建模系统规划业界观点敏捷开发
软考学院
程序员电子商务设计师法律法规考试大纲考试政策历年试题软件评测师软件设计师软考英语数据库系统工程师网络工程师网络管理员网络规划设计师系统分析师系统架构设计师信息技术处理员信息系统管理工程师信息系统监理师
通信学院
初级通信工程师传输与接入高级通信工程师互联网技术交换技术考试大纲考试动态考试题库设备环境通信法规终端与业务综合能力
网络工程学院
交换技术接入技术路由技术实施案例网络布线网络存储网络服务器网络管理无线网络系统应用网络协议网络设备
项目管理学院
系统集成项目管理工程师信息系统项目管理师CPMP考试IPMPPMP考试prince2认证项目采购管理项目成本管理项目范围管理项目风险管理项目沟通管理项目配置管理项目人力资源管理项目时间管理项目管理案例项目管理动态项目管理工具项目经理项目整合管理项目质量管理项目干系人管理
职称考试学院
职称考试题目职称考试指南职称考试资料
研究生院
考研英语考研题库招生信息就业指导考研经验考研政治考研数学
信息安全实验室
网络安全黑客教程杀毒防毒安全设置脚本攻防黑客入侵工具使用漏洞分析加密解密手机安全安全技术
物联网学院
生物识别二维码射频技术传感器物联网感知层物联网网络层物联网传输层物联网应用层物联网标准物联网前沿技术智能生活智慧城市物联网案例分析云计算虚拟化技术
Java学院
Javascript教程Java教程Java核心技术Java高级技术J2EE教程J2ME教程XML教程Java开源技术
Linux学院
Linux系统管理Unix教程Linux教程Linux编程Linux集群Linux内核技术Linux安全Linux服务器Solaris教程AIX教程
Windows学院
Windows系统管理Windows教程Windows安全Windows服务器Windows网络管理Windows故障Windows优化Windows动态
数据库学院
数据库开发Oracle数据库MySQL数据库Sybase数据库DB2数据库SQL Server数据库数据仓库Informix数据库