# NetSuite SuiteScript Governance Units Estimator

> Source: https://netray.co/tools/netsuite-suitescript-governance-units-estimator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Estimate how many records a SuiteScript execution can process under its governance limit and how many runs a batch will need.

## Category

netsuite

## Erp

Oracle NetSuite

## Audience

- NetSuite developer
- NetSuite admin
- Technical consultant

## Tool

**Kind:** calculator

**Inputs:**

#### Records to process

**Key:** records

**Type:** number

**Default:** 2500

**Min:** 1

**Step:** 100

**Unit:** records

#### Script type governance limit

**Key:** limit

**Type:** select

**Default:** 10000

**Options:**

##### Scheduled script (10,000)

**Value:** 10000

##### RESTlet (5,000)

**Value:** 5000

##### User event, Suitelet, client (1,000)

**Value:** 1000

#### Record loads per record

**Key:** loads

**Type:** number

**Default:** 1

**Min:** 0

**Step:** 1

#### Units per record load

**Key:** load_u

**Type:** number

**Default:** 10

**Min:** 0

**Step:** 1

**Unit:** units

**Help:** Check the SuiteScript governance table for your record type and API.

#### Record saves per record

**Key:** saves

**Type:** number

**Default:** 1

**Min:** 0

**Step:** 1

#### Units per record save

**Key:** save_u

**Type:** number

**Default:** 20

**Min:** 0

**Step:** 1

**Unit:** units

#### Lookups or searches per record

**Key:** lookups

**Type:** number

**Default:** 1

**Min:** 0

**Step:** 1

#### Units per lookup

**Key:** lookup_u

**Type:** number

**Default:** 2

**Min:** 0

**Step:** 1

**Unit:** units

#### Safety reserve per run

**Key:** reserve

**Type:** number

**Default:** 300

**Min:** 0

**Step:** 50

**Unit:** units

**Help:** Units kept back to reschedule or finish cleanly.

**Outputs:**

#### Units per record

**Key:** per_record

**Expr:** loads * load_u + saves * save_u + lookups * lookup_u

**Format:** integer

#### Total units for the batch

**Key:** total

**Expr:** per_record * records

**Format:** integer

#### Records per run

**Key:** per_run

**Expr:** max(1, floor((limit - reserve) / per_record))

**Format:** integer

**Primary:** true

#### Runs needed

**Key:** runs

**Expr:** ceil(records / per_run)

**Format:** integer

**Primary:** true

#### Limit used by one record

**Key:** util

**Expr:** per_record / limit * 100

**Format:** percent

**Chart:**

#### Runs needed vs records to process

**Type:** bar

**X:** records

**From:** 500

**To:** 10000

**Steps:** 20

**Series:**

- runs

**Disclaimer:** Unit costs are inputs on purpose. They differ by API, record type and sometimes account configuration. Confirm in the NetSuite help center before relying on the result.

## Content

**Intro:** Every SuiteScript execution has a governance budget, and running out mid-batch means a failed or half-finished job. This estimator turns the units each record costs into records per run and runs needed, so you can choose between rescheduling, splitting work or moving to Map/Reduce.

**Sections:**

#### How to use it

**Body:** Choose the limit for your script type. Enter how many records you must process, then the number of loads, saves and lookups per record and their unit cost. Defaults are illustrative; replace them with figures from the governance table for the exact methods you call. Keep a reserve so the script can reschedule itself or write a summary before it hits zero. The output tells you how many records one run handles and how many runs a full batch needs.

#### The arithmetic

**Body:** Units per record equals loads times load cost plus saves times save cost plus lookups times lookup cost. Records per run is the limit minus the reserve, divided by units per record, rounded down. Runs needed is records divided by records per run, rounded up. Anything that reduces per-record units, such as submitting field changes without loading the record or using search columns instead of loading, multiplies throughput directly. For large volumes, Map/Reduce distributes work across stages and processes with its own limits.

**Bullets:**

- Prefer record.submitFields over load and save for simple updates
- Return needed values in search columns, not by loading records
- Check remaining usage inside loops and reschedule cleanly

#### Common mistakes

**Body:** Developers often test with ten records and discover the limit only in production with ten thousand. Another is forgetting that nested loops, subrecord operations and calls inside sublists add units. Also, governance is only one limit: concurrency, script execution time and the number of queued scheduled scripts matter too. Use this estimator early in design, then confirm with the execution log, which shows actual usage per run.

**Cta:** Netray can review your scripts and saved searches for high-governance patterns and suggest lower-cost alternatives for your team to approve.

**Faq:**

#### What are governance units in SuiteScript?

**Answer:** Governance units are a budget that NetSuite assigns to each script execution. Different API calls consume different amounts, and when the budget is exhausted the script stops with an error. Limits differ by script type.

#### When should I use Map/Reduce instead?

**Answer:** Use Map/Reduce when the data set is large, the work can run in parallel and you want the platform to manage yielding and restarts. For small or strictly sequential jobs, a scheduled script is simpler.

#### Why keep a reserve?

**Answer:** A reserve lets the script detect that it is near the limit, save its place and reschedule, instead of failing partway through a record update. It also covers cleanup and logging calls.

#### Are the default unit costs exact?

**Answer:** No. They are illustrative placeholders. Costs vary by API and record type, so check the official governance documentation for each call you use and enter those figures.

## Search terms

suitescript governance units, netsuite governance limit calculator, scheduled script governance, netsuite script usage limit, suitescript 2.1 governance, netsuite map reduce vs scheduled script, netsuite record load governance cost

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