Wednesday, April 11, 2007

Software Performance Testing

PaC Definition - 1

#Definition
Performance testing is testing that is performed, from one perspective, to determine how fast some aspect of a system performs under a particular workload. It can also serve to validate and verify other quality attributes of the system, such as scalability and reliability.
#Purpose
It can demonstrate that the system meets performance criteria.
It can compare two systems to find which performs better.
It can measure what parts of the system or workload cause the system to perform badly.
#Specifications
Requirements development phase - Ideally, this is done during the requirements development phase of any system development project, prior to any design effort. See Performance Engineering for more details.
Performance profile tuning - Performance testing is frequently used as part of the process of performance profile tuning. The idea is to identify the “weakest link” of a system.
Peak time - It is always helpful to have a statement of the likely peak numbers of users that might be expected to use the system at peak times.
#Test Questions
1.What is the performance test scope?
2. For involved UI, how many concurrent users are expected for each specify peak vs. nominal?
3. What does the target system hardware look like?
4. What is the Application Workload Mix of each application component? (For example: 20% login, 470% search, 10% checkout).
5. What is the System Workload Mix? (For example: 30% Workload A, 20% B, 50% C)
6. What are the time requirements of processes?
#Tasks to undertake
Gather performance requirements
Develop a high-level plan, including requirements, resources, timelines and milestones
Develop a detailed performance test plan
Choose test tool
Specify test data needed and charter effort
Develop scripts for each application/component under test
Develop detailed performance test project plan
Configure the test environment
Execute tests
Analyze the results

(Reference: http://en.wikipedia.org/wiki/Software_performance_testing)


Labels:

Monday, April 9, 2007

Solaris System Configuration

# system configuration
/usr/platform/`uname -i`/sbin/prtdiag -v
sysdef
# Display processor type, speed
psrinfo -v
# Display the device list (and drivers attached to devices)
prtconf -D
# HD info(vendor, RPM, capacity)
iostat -E
# Display the number of used and free i-nodes
df -F ufs -o i
# print the version of OBP
prtconf -V
/usr/platform/`uname -i`/sbin/prtdiag -v | grep OBP
# print the version of Open Windows
showrev -w
# Printing disk geometry and partition info
su - root
prtvtoc /dev/rdsk/c0t0d0s0
# Find out a package which a file belongs to
pkgchk -l -p /usr/lib/sendmail
# Display processes with the highest CPU utilization
ps -eo pid,pcpu,args | sort +1n
# Display processes with the highest memory usage
ps -eo pid,vsz,args | sort +1n
# Examining gcc behavior
gcc -v -x c /dev/null
#Display the version of CDE
/usr/ccs/bin/what /usr/dt/bin/dtmail
# Display the version of BIND
nslookup -class=chaos -q=txt version.bind ns0.optix.org
dig @ns-tk021.ocn.ad.jp version.bind chaos txt
#lists the use/totalin local file systems stored on physical disks, but it does not include /proc virtual file system, the floppy disk, or swap space.
df -lk | egrep -v "Filesystem|/proc|/dev/fd|swap" | awk '{ total_kbytes += $2 } { used_kbytes += $3 } END { printf "%d of %d kilobytes in use.\n", used_kbytes, total_kbytes }'
# Checking whether it's running in 32-bit mode or 64-bit mode
.64-bit mode
isalist -v
isainfo -v
>>64-bit sparcv9 applications
>>32-bit sparc applications
.32-bit mode
isalist -v
isainfo -v
>>32-bit sparc applications
# Verifying a route to a specified network
route -n get xxx.yyy.zzz.0
# patch applied on the system
showrev -p
# exported file system on NFS server
showmount -e NFS_SERVER
# display current run level
who -r

Labels:

Wednesday, April 4, 2007

Where I start

The following unix/lunix commands are what I ususally use.

# List the files under current directory with specified string1?
find / -name "*.jsp" -exec grep "web" {}\;
# List the files in current directory sorted by size ?
ls -l | grep ^- | sort -nr
# List the hidden files in current directory ?
ls -a1 | grep "^\."
# Delete blank lines in a file ?
cat sample.txt | grep -v '^$' > new_sample.txt
# Search for a sample string in particular files ?
grep "anything" *.conf
# Display the all files recursively with path under current directory ?
find . -depth -print
.Display the files in the directory by file size ?
ls -lrt | sort -nr -k 5
# How much space is used for users in kilobytes ?
quot -af
# How to create null file ?
cat /dev/null > filename1
# How to save man pages to a file ?
man | col -b >
# How do you find out drive statistics ?
iostat -E
# Display disk usage in Kilobytes ?
du -k
# Display top ten largest files/directories ?
du -sk * | sort -nr | head
# Display the Disk Usage of file sizes under each directory in currentDirectory ?
du -k * | sort -nr
du -k . | sort -nr
# Display the page size of memory ?
pagesize -a
# Display Ethernet Address arp table ?
arp -a
# Display the no.of active established connections to localhost ?
netstat -a | grep EST
# Display the state of interfaces used for TCP/IP traffice ?
netstat -i
# Alternative for top command ?
prstat -a
# Do a search and replace on a given string in all of the files in the current directory
perl -p -i -e 's/oldstring/newstring/g' *
# Do a search and replace on a given string in all of the files recursively across the current directory
perl -p -i -e 's/oldstring/newstring/g' `find ./ -name *.html`
# Delete a file by inode
find . -inum 596409 -exec rm -i {} \;
# Save line 201 to line 400 of a file to another file
vi file1
:201,400 w!file2
# Sort line 101 to line 100 of a file
vi file2
:101,200 !sort

Labels:

Tuesday, April 3, 2007

Motivation

I started work at Openwave System in the Performance and Capacity group in February 2007. I'm learning performance and capacity and and want a place to share it.