Fix script execution speed

vktripper
Tera Contributor

I am running a fix script to update several million CI records. We are tracking the time it takes for the script to run and complete. Can I expect the performance (script execution speed, time taken to complete etc.) in PRD to be any different than in sub-PRD instances?

1 ACCEPTED SOLUTION

No.  While you may have overall more horsepower in production, each processor has roughly the same resources available.  With a fix script being single threaded, you don't get any benefits from a larger production environment.

 

I've run many large scripts, and done a lot in the way of performance testing them before releasing to production.  I've never been surprised with a significantly different run time in prod then what I calculated.

View solution in original post

9 REPLIES 9

No.  While you may have overall more horsepower in production, each processor has roughly the same resources available.  With a fix script being single threaded, you don't get any benefits from a larger production environment.

 

I've run many large scripts, and done a lot in the way of performance testing them before releasing to production.  I've never been surprised with a significantly different run time in prod then what I calculated.

As chris M said,  A fix is single threaded in Prod or sub Prod. So its all the same in terms of speed in Production or sub production. 

What if the fix script affected records that had Business Rules and other server-side scripts? I'm assuming that .setWorkflow(false) has not been declared - would the Prod servers process the fix script more quickly?

Hi,

 

According to me, we should not rely on hardware to make our scripts run faster. 

Hardware will be an added advantage if our scripts are coded better. 

If you have read replicas installed, better run the fix script in batches , so that the read replicas does not go out of sync.

Ideally fix script will be run to fix some data. It is better to avoid setWorkflow(false) and take care of fixing the data in all tables.

Thanks

Hey satyach,

I completely agree with what you say. I'm not suggesting we hide poor scripting/practices by simply using more powerful hardware. I'm asking how deep single-threading of fix scripts persists so I can better understand what's going on 'under the hood'. Does single-threading still apply to server-side scripts that are triggered by table changes from a single-threaded fix-script, or does normal multi-threading take over?

thanks,

Andy