Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Shell script and Big O notation Post 302664937 by alister on Sunday 1st of July 2012 11:52:17 AM
Old 07-01-2012
Quote:
Originally Posted by pandeesh
So how we can measure the performance of a script in general?
Big O notation does not in itself provide you with any useful performance information; it's merely one characteristic of an algorithm's complexity.

O(n) is usually better than O(n^2), but if you're working on a small data set and the O(n) approach requires some expensive setup to begin, the O(n^2) solution could be the better choice.

In the end, you need to test the code with what will be a typical workload, under typical operating conditions, on typical hardware.

Regards,
Alister
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to view a big file(143M big)

1 . Thanks everyone who read the post first. 2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too. How to view it ? If I want to view 200-300 ,how can I implement it 3 . Thanks (3 Replies)
Discussion started by: chenhao_no1
3 Replies

2. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

3. UNIX for Dummies Questions & Answers

How big is too big a config.log file?

I have a 5000 line config.log file with several "maybe" errors. Any reccomendations on finding solvable problems? (2 Replies)
Discussion started by: NeedLotsofHelp
2 Replies

4. Shell Programming and Scripting

Convert decimal notation to ANSI point code notation

wondering if anyone has any thoughts to convert the below thru a shell script Convert decimal signalling point notation to ANSI point code notation There is a site that does that conversion but i need to implement the solution in a shell script.....Thoughts.... OS: Solaris 9 ... (4 Replies)
Discussion started by: aavam
4 Replies

5. Shell Programming and Scripting

C-script notation

Just a very brief question, but I have a script written in a C-like language possibly tcl with the line set var ... ...All I want to know, is ** multiplication or is it exponentiation? What is the ** operator? (1 Reply)
Discussion started by: chrisjorg
1 Replies

6. Shell Programming and Scripting

Perl: scientific notation to decimal notation

hello folks, I have few values in a log which are in scientific notation. I am trying to convert into actual decimal format or integer but couldn't able to convert. Values in scientific notation: 1.1662986666666665E-4 2.0946799999999998E-4 3.0741333333333333E-6 5.599999999999999E-7... (2 Replies)
Discussion started by: scriptscript
2 Replies

7. UNIX for Advanced & Expert Users

Big problem: shell entry in /etc/passwd corrupted for user root

did a big mistake, changing root entry of /etc/passwd to root:x:0:0:root:/root:/usr/bin/tmux split-window -v \; attach as expected, now I can't login as root anymore. sudo ed /etc/passwd etc. doesn't work. Any idea? Use code tags to increase readability and follow the rules. (4 Replies)
Discussion started by: dodona
4 Replies
loratune(1M)															      loratune(1M)

NAME
loratune - initiate LORA tuneup to improve alignment of processing resources SYNOPSIS
DESCRIPTION
The command improves the performance of an HP-UX system in LORA (Locality-Optimizated Resource Alignment) mode, by triggering the kernel to do optimization tuning of the system and application memory. The command may return before the tuning is complete. This tuning can continue in the background for several minutes after the command returns. If the command is interrupted, or the command process is otherwise terminated, no subsequent tuning operations will be initiated, but those in progress will continue until completion. When no options are specified, all locality domains are tuned. Options This option limits the tuning to the locality domain specified by lid. Application Usage In Locality-Optimized Resource Alignment (LORA) mode, performance of applications may improve when their processors and the memory that they use are aligned in the same locality. The HP-UX kernel attempts to maintain such alignment at all times, but it is possible for mis- alignment to occur when the system workload transitions significantly. If that happens, the command can be used to reestablish alignment and improve application performance. Here are some examples of workload transition events that may cause misalignment of processing resources: o Starting or terminating an application that consumes a large amount of processor or memory resources. o The workload demand surges far above the normal level and then recedes. o Dynamic platform operations that add or subtract processor or memory resources from the operating system's control. If one of those events has occurred, and application performance is not as high as it can be, then it is appropriate to invoke the command. RETURN VALUES
The command returns a 0 when successful, and a non-zero value when unsuccessful. ERRORS
The command will not initiate any tuning and will return a non-zero value if the user does not have appropriate privilege. WARNINGS
The command can consume a significant amount of system processing resources to restore optimal alignment. Ideally, the command should be invoked prior to the time when performance is critical, not during the time when performance is critical. The command should be invoked after the workload transition is complete, not during workload transition. Although tuning can continue in the background for several min- utes, it is not necessary to wait any more than five minutes between invoking the command and launching new applications. EXAMPLES
If eight instances of SAP were running in localities with locality domain identifiers 4 and 5, and four of those instances were shut down, then it would be appropriate to tuneup the remaining four instances. An example command would be: If an HP-UX system in LORA mode had one of its cells deactivated, then it would be appropriate to tuneup the entire system. An example command would be: AUTHOR
was developed by HP. SEE ALSO
mpsched(1), numa_policy(5), lora(7). Itanium(R)-based Systems Only loratune(1M)
All times are GMT -4. The time now is 05:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy