# NetSuite Map/Reduce Parallelism Throughput Calculator

> Source: https://netray.co/tools/netsuite-map-reduce-parallelism-throughput-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Estimate map stage runtime, speed-up and efficiency from the processor count you configure and the share you actually receive.

## Category

netsuite

## Erp

NetSuite

## Audience

- SuiteScript developer
- NetSuite technical architect

## Tool

**Kind:** calculator

**Inputs:**

#### Items in the map stage

**Key:** items

**Type:** number

**Default:** 50000

**Min:** 1

**Step:** 1000

**Unit:** items

#### Concurrency set on deployment

**Key:** processes

**Type:** slider

**Default:** 5

**Min:** 1

**Max:** 20

**Step:** 1

**Unit:** processes

#### Share of processors you actually get

**Key:** share

**Type:** slider

**Default:** 60

**Min:** 10

**Max:** 100

**Step:** 5

**Unit:** %

**Help:** Other scripts in the queue compete for the same processors.

#### Seconds per item

**Key:** sec_per_item

**Type:** number

**Default:** 0.8

**Min:** 0.01

**Step:** 0.05

**Unit:** seconds

#### Fixed overhead for stages

**Key:** startup_min

**Type:** number

**Default:** 3

**Min:** 0

**Step:** 1

**Unit:** minutes

**Help:** getInputData, summarize and queue start time.

**Outputs:**

#### Effective processes

**Key:** effective

**Expr:** max(1, floor(processes * share / 100))

**Format:** integer

#### Time if run serially

**Key:** serial_min

**Expr:** items * sec_per_item / 60

**Format:** minutes

#### Map stage time

**Key:** map_min

**Expr:** ceil(items / effective) * sec_per_item / 60

**Format:** minutes

**Primary:** true

#### Total elapsed estimate

**Key:** total_min

**Expr:** map_min + startup_min

**Format:** minutes

**Primary:** true

#### Speed-up vs serial

**Key:** speedup

**Expr:** serial_min / max(total_min, 0.001)

**Format:** decimal

#### Parallel efficiency

**Key:** efficiency

**Expr:** speedup / effective * 100

**Format:** percent

**Description:** Lower means overhead is eating the benefit.

**Chart:**

#### Total minutes vs configured concurrency

**Type:** line

**X:** processes

**From:** 1

**To:** 20

**Steps:** 20

**Series:**

- total_min

**Disclaimer:** Real map/reduce runtimes also depend on yielding, script governance and how work is distributed across keys. Use this to compare options, then measure on realistic data in a sandbox.

## Content

**Intro:** Map/reduce lets NetSuite run your code in parallel, but raising the concurrency setting does not always make a job proportionally faster. This tool shows where the returns diminish.

**Sections:**

#### How to use it

**Body:** Enter the number of items the getInputData stage returns, the concurrency you configure on the script deployment, and the time one map invocation takes. The share slider represents the fraction of those processors you realistically receive when other scripts are queued. The fixed overhead covers the stages that do not parallelise. The output shows effective processes, map stage time, total elapsed time, speed-up and efficiency.

#### The model

**Body:** Effective processes equal the configured value multiplied by your share, rounded down and never below one. Map time equals items divided by effective processes, rounded up, multiplied by the time per item. Adding the fixed overhead gives total time, and dividing the serial time by that total gives the speed-up. This is Amdahl's law in simple form: the fixed overhead puts a ceiling on gains regardless of how many processes you request.

**Bullets:**

- Effective = floor(configured x share)
- Map time = ceil(items / effective) x seconds per item
- Speed-up = serial time / total time
- Efficiency = speed-up / effective processes

#### Reading the result

**Body:** Efficiency above about 80 percent means extra processes are well spent. When efficiency falls below 50 percent, the fixed overhead or the share you receive is the bottleneck, and more concurrency only reserves capacity other scripts could use. If speed-up is close to the effective process count, your work distributes evenly. If the real runtime is far worse, check for a hot key where one reduce key holds most of the work.

#### Common mistakes

**Body:** People often assume that setting 20 processes guarantees 20 workers. Processors are shared across the account and scheduled by priority, so a busy account may give you a few. A second mistake is a skewed key design, where a single reduce key receives a very large list. A third is heavy work in getInputData or summarize, which runs unparallelised.

**Bullets:**

- Keep map work independent and idempotent
- Avoid one huge key in the reduce stage
- Move heavy setup out of getInputData where possible
- Test at off-peak and peak to see your real share

**Cta:** If a nightly map/reduce is slow or unpredictable, Netray can review its design and the account processor contention.

**Faq:**

#### Does more concurrency always help?

**Answer:** No. Gains stop when other scripts compete for processors, when fixed stages dominate, or when work is skewed to a few keys. Use the efficiency output to see when to stop adding processes.

#### Where is concurrency set?

**Answer:** On the script deployment record, where you choose the number of processors the deployment may use. The actual number you receive also depends on account-level processor availability and queue priority.

#### How do I estimate seconds per item?

**Answer:** Run a sample of a few hundred items in a sandbox and divide the map stage duration from the execution log by the item count. Do this at a normal data size rather than with an empty account.

#### Is map/reduce better than a scheduled script?

**Answer:** For large independent workloads, usually yes, because it distributes work and restarts failed items. For small jobs with strict ordering, a scheduled script is simpler and has less overhead.

## Search terms

netsuite map reduce concurrency, suitescript map reduce processors, map reduce deployment concurrency limit, netsuite map reduce performance, suitecloud processors map reduce, map reduce runtime estimate

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
