Determining command overhead? (TOS: cpu seconds per hour)

Status
Not open for further replies.

xweb3x10

Member
Messages
34
Reaction score
1
Points
8
I ran a certain Cron job several times to dial it in and ran up against the cpu limit. I'm out of the penalty box now and the job has since been set to run no more than once a day but it left me wondering...

...is there a way to determine what the "cost" of any given command would be?

FWIW: I plan on dumping a 12mb db, zipping approx 32 mb, deleting a 25 mb directory, then copying a 25 mb directory to another directory, then uploading the zip file to a cloud. I plan on doing these in the early am hours.

upload_2013-12-22_13-49-15.png
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,929
Reaction score
118
Points
63
The zipping process is what will be using the majority of your CPU -- file compression and uncompression are generally very CPU-intensive operations. Beyond that, there are ways to profile your own scripts to see how much CPU they are using if you simply must know the numbers. If you want general knowledge of X is more expensive than Y, Google goes a long way towards that.
 
Status
Not open for further replies.
Top