|
发表于 2006-4-1 20:35:47
|
显示全部楼层
真是长啊,红色部分不好翻译,然后页面的格式也不是太好,有点晕...
http://boinc.berkeley.edu/sched_locality.php
Locality scheduling
Last modified 12:23 AM UTC, March 17 2005
局部调度
Locality scheduling is intended for projects for which
* Each workunit has a large input file (it may have other smaller input files as well).
* Each large input file is used by many workunits.
The goal of locality scheduling is to minimize the amount of data transfer to hosts. In sending work to at given host, the scheduler tries to send results that use input files already on the host.
局部调度用于如下类型的项目:
* 每个任务包都有比较大的输入文件(同时也可以有其它一些更小的输入文件)。
* 每个大的输入文件都被多个任务包所使用。
局部调度的目标是尽可能减少主机的数据传输量。在向特定主机发送任务的时候,调度服务会试图发送那些使用已经在该主机上的输入文件的计算结果。
To use locality scheduling, projects must do the following:
* Workunit names must be of the form FILENAME__*, where FILENAME is the name of the large input file used by that workunit. These filenames cannot contain '__'.
* The <file_info> for each large input file must contain the tags
<sticky/>
<report_on_rpc/>
* The config.xml file must contain
<locality_scheduling/>
要使用局部调度,项目必须做如下工作:
* 任务包的名称必须是 FILENAME__* 的形式,其中FILENAME是任务包所使用的大输入文件的名称。这个文件名不能包含“__”。
* 每个大输入文件的 <file_info> 必须包含如下标签:
* config.xml 文件必须包含:
Locality scheduling works as follows:
* Each scheduler RPC contains a list of the large files already on the host, if any.
* The scheduler attempts to send results that use a file already on the host.
* For each file that is on the host and for which no results are available for sending, the scheduler instructs the host to delete the file.
局部调度按如下方式工作:
* 每个调度服务的远端过程调用都包含一个主机上已存在的大文件列表。
* 调度服务试图发送那些使用主机上已经存在的文件的计算结果。
* 对于主机上的每一个已经没有计算结果可以发送的文件,调度服务通知主机删除该文件。
On-demand work generation
按需的任务生成
This mechanism, which is used in conjunction with locality scheduling, lets a project create work in response to scheduler requests rather than creating all work ahead of time. The mechanism is controlled by an element in config.xml of the form:
<locality_scheduling_wait_period> N </locality_scheduling_wait_period>
where N is some number of seconds.
When a host storing file X requests work, and there are no available results using X, then the scheduler touches a 'trigger file'
PROJECT_ROOT/locality_scheduling/need_work/X
The scheduler then sleeps for N seconds, and makes one additional attempt to find suitable unsent results.
这个机制,配合局部调度使用,可以使项目根据调度请求来创建任务而不是预先把任务都生成好。此机制可以通过 config.xml 文件中的一个元素来控制:
其中 N 是以秒为单位的一个数字。
当存储了文件 X 的主机请求任务而服务端并没有使用文件 X 的计算结果时,调度服务将创建一个“触发文件”在:
然后调度服务将休眠 N 秒,再试图寻找合适的非发送的计算结果。
The project must supply a 'on-demand work generator' daemon program that scans the need_work directory. If it finds an entry, it creates additional workunits for the file, and the transitioner then generates results for these workunits. N should be chosen large enough so that both tasks complete within N seconds most of the time (10 seconds is a good estimate).
The work generator should delete the trigger file after creating work.
项目必须提供一下提供“按需任务生成”服务的后台程序,它将对 need_work 目录进行扫描。如果寻找到文件,它会为该文件创建额外的任务包,而转换服务(transitioner)也将为些任务包生成计算结果。N 应该足够大,以便这两步操作可以在最多 N 秒的时间内完成(比如10秒就是一个不错的估计)。
In addition, if the work generator (or some other project daemon) determines that no further workunits can be made for a file X, then it can touch a trigger file
PROJECT_ROOT/locality_scheduling/no_work_available/X
If the scheduler finds this trigger file then it assumes that the project cannot create additional work for this data file and skips the 'notify, sleep, query again' sequence above. Of course it still does the initial query, so if the transitioner has made some new results for an existing (old) WU, they will get picked up.
另外,如果任务生成器(或其它的项目后台程序)认为已经没有更多的任务包可以为文件 X 创建,那它将创建如下的触发文件:
如果调度服务找到了这个触发文件,那它就认为项目已经不能为这个数据文件创建更多的任务,它将跳过上面的“通知,休眠,再次查询”的步骤。当然,它仍然会进行第一次查询,因此如果转换服务已经为一个现有的任务包生成了一些新的计算结果,他们将被如数取走。
Implementation notes
实现细节
Work is organized in a hierarchy:
File -> workunit -> result
Let's say there are N active hosts and target_nresults=M. Optimally, we'd like to send each file to M hosts, and have them process all the results for that file.
If the one_result_per_user_per_wu rule is in effect, a file may have work but be 'excluded' for a particular user.
任务按如下的层次结构组织:
文件 -> 任务包 -> 计算结果
如果说有 N 个活动的主机,target_nresults 的值是M。理想情况下,我们想要把每个文件都发送给 M 个主机,并且让他们处理使用那个文件的所有计算结果。
如果设置了 one_result_per_user_per_wu(每用户每任务只能有一个计算结果) 标志,有可能虽然一个文件仍有任务,但并不会发送给一个特定的用户。
Assigning work to a host with no files:
* maintain a working set of N/M files
* when a host with no file requests work, choose a file F uniformly (randomly or sequentially) from the working set.
* if F is excluded for this user, choose a file using a deterministic algorithm that doesn't involve the working set (don't want to do this in general to avoid flocking)
The working set is represented by a directory
PROJECT/locality_scheduling/file_working_set/
whose contents are names of files in the working set. A project-specific 'working set manager' daemon is responsible for maintaining this.
If the scheduler finds that there are no sendable results for a file, it makes a file with that name in
PROJECT/sched_locality/files_no_work/
The working set manager should poll this directory and remove those files from the working set. NOTE: BOINC may later create more results for the file, so it may be necessary to add it to the working set again.
向没有文件的主机分发任务时:
* 维护一个由 N/M 个文件组成的任务集
* 当没有文件的主机请求任务时,按某种方式(随机地或顺序地)从任务集中选择一下文件 F。
* 如果 F 不适合该用户,使用一个确定性的工作集无关(以防止flocking)的算法来选择一个文件。
如果调度服务发现没有适合某个文件的可以送出的计算结果,它会创建一个同名文件在:
任务集管理器会检查这个目录,然后从任务集中移除相关的文件。注意:BOINC 可能以后会为该文件创建更多的计算结果,因此仍有可能再次把它加入到任务集中。
Assigning work to a host with a file F:
* send more results for file F. To do this efficiently, we maintain the following invariant: For a given user/file pair, results are sent in increasing ID order.
Some projects may want to generate work incrementally. They can do this by supplying a 'work generator' daemon that polls the directory
PROJECT/locality_scheduling/need_work/
and creates work for any filenames found there. To enable this, add the element to config.xml; this tells the scheduler how long to wait for work to appear.
NOTE: we assume that all results have app_versions for the same set of platforms. So if any result is rejected for this reason, we give up immediately instead of scanning everything.
向有文件 F 的主机分发任务时:
* 发送更多的使用文件 F 的计算结果。为保证效率,我们维护了一个不变量:对于给定的用户或文件对,计算结果按 ID 递增的顺序发送。
一些项目可能希望增量地生成任务。它们可以通过提供一个“任务生成器”后台程序定期检查如下目录:
并为在目录中找到的文件创建任务来做到。在 config.xml 文件中增加一个元素就可以启用(参考上面的"按需的任务生成"部分);调度程序可从中知道应该等待多长时间才有任务出现。
注意:我们假设对于同样的平台集,所有的计算结果都有 app_versions。因此如果任何计算结果因为这个原因被拒绝,我们将立即放弃而不去做任何扫描。
[ Last edited by Youth on 2006-4-1 at 20:37 ] |
评分
-
查看全部评分
|