# US 9,354,938 B2 · Sequential cooperation between map and reduce phases to improve data locality

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,354,938 B2
- Document ID: US9354938B2
- Status: Granted
- Kind: B2
- Application number: 13/860,073
- Filed: 2013-04-10
- Published: 2014-10-16
- Granted: 2016-05-31
- Earliest claimed: 2013-04-10
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Shicong Meng; Xiaoqiao Meng; Jian Tan; Li Zhang
- Web page: https://patentgrep.com/patent/US9354938B2

## CPC

- G06F 9/5066: {Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs (mappping at compile time, see G06F8/451)}
- G06F 2209/502: Proximity
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and arrangements for task scheduling. A job is accepted, the job comprising a plurality of phases, each of the phases comprising at least one task. For each of a plurality of slots, a fetching cost associated with receipt of one or more of the tasks is determined. The slots are grouped into a plurality of sets. A pair of thresholds is determined for each of the sets, the thresholds being associated with the determined fetching costs and comprising upper and lower numerical bounds for guiding receipt of one or more of the tasks. Other variants and embodiments are broadly contemplated herein.

## Claims

### Claim 1

A method comprising:
accepting, using a processor, a job, the job comprising a plurality of phases including map and reduce phases, each of the phases comprising at least one task;
determining, using a processor, for each of a plurality of slots corresponding to the reduce phases, a fetching cost associated with receipt of one or more of the tasks;
grouping, using a processor, the slots into a plurality of sets;
for each of the sets, setting, using a processor, upper and lower numerical bounds for guiding receipt of one or more of the tasks, the upper and lower bounds for each set being associated with the determined fetching costs;
estimating, using a processor, an intermediate data size of the job;
determining, using a processor, a ratio of the intermediate data size to a number of reduce tasks associated with the job;
determining, using a processor, a set wherein the ratio falls between the upper and lower numerical bounds associated with the set; and
assigning, using a processor, the one or more of the tasks to the determined set wherein the ratio falls between the upper and lower numerical bounds.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the map and reduce phases are at least partially overlapping with respect to one other.

### Claim 3 (depends on 1)

The method according to claim 1, wherein said assigning comprises applying a receding horizon control policy.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the receding horizon control policy minimizes an expected fetching cost for two sequential reduce tasks.

### Claim 5

An apparatus comprising:
at least one processor; and
a computer readable storage medium having computer readable program code embodied therewith and executable by the at least one processor, the computer readable program code comprising:
computer readable program code configured to accept a job, the job comprising a plurality of phases including map and reduce phases, each of the phases comprising at least one task;
computer readable program code configured to determine, for each of a plurality of slots corresponding to the reduce phases, a fetching cost associated with receipt of one or more of the tasks;
computer readable program code configured to group the slots into a plurality of sets;
computer readable program code configured to, set upper and lower numerical bounds for guiding receipt of one or more of the tasks, the upper and lower bounds for each set being associated with the determined fetching costs; and
computer readable program code configured to:
estimate an intermediate data size of the job;
determine a ratio of the intermediate data size to a number of reduce tasks associated with the job;
determine a set wherein the ratio falls between the upper and lower numerical bounds associated with the set; and
assign the one or more of the tasks to the determined set wherein the ratio falls between the upper and lower numerical bounds.

### Claim 6

A computer program product comprising:
a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:
computer readable program code configured to accept a job, the job comprising a plurality of phases including map and reduce phases, each of the phases comprising at least one task;
computer readable program code configured to determine, for each of a plurality of slots corresponding to the reduce phases, a fetching cost associated with receipt of one or more of the tasks;
computer readable program code configured to group the slots into a plurality of sets;
computer readable program code configured to, set upper and lower numerical bounds for guiding receipt of one or more of the tasks, the upper and lower bounds for each set being associated with the determined fetching costs; and
computer readable program code configured to:
estimate an intermediate data size of the job;
determine a ratio of the intermediate data size to a number of reduce tasks associated with the job;
determine a set wherein the ratio falls between the upper and lower numerical bounds associated with the set; and
assign the one or more of the tasks to the determined set wherein the ratio falls between the upper and lower numerical bounds.

### Claim 7 (depends on 6)

The computer program product according to claim 6, wherein the map and reduce phases are at least partially overlapping with respect to one other.

### Claim 8 (depends on 6)

The computer program product according to claim 6, wherein said computer readable program code is configured to assign at least one reduce task via applying a receding horizon control policy.

### Claim 9 (depends on 8)

The computer program product according to claim 8, wherein the receding horizon control policy minimizes an expected fetching cost for two sequential reduce tasks.
