DavidYahalom.com is an IT knowledgebase dedicated to the world of databses and RDBMS systems by David Yahalom. Here you'll find articles, views, news, tips and in-depth analysis about Oracle, DB2 LUW, Sql Server and MySql. I hope you'll enjoy your stay.
23rd
JUL
Simulate load on your linux server using a one-liner
Posted by David Yahalom under Unix, Linux, General IT
Yesterday I needed a quick way to simulate load on a Linux sever. I wanted to find out that my monitoring system is working and sending alerts.
While there are many many tools that can do this, all I needed was a simple bash one-liner shell script that can make the CPUs beg for mercy.
What I ended up using is this:
dd if=/dev/zero bs=100M | gzip | gzip -d | gzip | gzip -d | gzip | gzip -d > /dev/null &
Send a few of these babies to the background and you’ll start seeing smoke coming from your server soon enough.
19th
APR
UltraSparc Vs. x86 servers. Which one runs Oracle faster?
Posted by David Yahalom under Hardware, Solaris, Linux, Oracle
I was doing research for a client that is trying to replace old Sun UltraSparc Solaris servers with new, cheaper (and hopefully better performing), Linux x86 machines. I want to see if I can find any benchmarks that will help me compare the performance of SPARC servers to x86 machines when running Oracle Database.
First I started by looking in TPC’s OLTP benchmark results, which are considered somewhat of an industry standard. I found several interesting things.
Let’s look at two low end HP machines, the ProLiant ML350G5 and the ML370G5. These are both low-end Dual-CPU socket x86 servers from HP starting at a price lower then $2,500 for both servers.
low-end HP ProLiant ML350G5 (1 X Intel X5355 Quad-Core) - 100,926 TPC-C/Sec
http://www.tpc.org/tpcc/results/tpcc_result_detail.asp?id=107061101
low-end ProLiant ML370 G5 (2 X Intel X5460 Quad-Core) - 273,666 TPC-C/Sec
http://www.tpc.org/tpcc/results/tpcc_result_detail.asp?id=107111201
While I was unable to fund recent benchmarks of Sparc machines in TPC, I was able to find benchmark that while conducted several years ago might still be useful.
OLDish (2003) Fujitsu PRIMEPOWER 2500 (64 X SPARC64 - 1.3 GHz ) - 595,702 TPC/Sec
http://www.tpc.org/tpcc/results/tpcc_result_detail.asp?id=103103101
This is a high-end server with 64 SPARC processors. In its time it was quite the beast and can still be found in many data centers worldwide crunching very important numbers.
As you can see it scored twice the number of points compared to the ProLiant ML370G5. Impressive. Sure. Just keep in mind that we are talking about a really expensive high-end 64CPU machine against a very low-end 2 X QuadCore (8 cores total) Intel-based commodity server. So eight times the CPUs for roughly twice the performance? 83.2 total SPARC Ghz vs. 25.28 total x86 Ghz ? Still confused? According to TPC the Fujitsu machine is almost X20 more expensive compared to the x86 HP server. Twice the performance for 20 times the price?
So yes, the Fujitsu PRIMEPOWER is an older server with older CPU models but it is also a much more expensive server and we can still use this data when considering replacing old SUN servers with newer X86 alternatives. These results can help us better understand what type of x86 hardware we need in order to replace our old SPARC servers. This isn’t %100 scientific comparison but it can still give us a ballpark estimate.
We’ll need to do some more digging to find more current results using newer SPARC processors (such as the Sun T1). What I was able to find were some MySQL benchmarks done by tweakers.net for their own web application. While these are very tailored benchmarks done for a specific web site application it does help contribute to the general picture here.
http://tweakers.net/reviews/646/14/server-duel-xeon-woodcrest-vs-punt-opteron-socket-f-pagina-14.html
http://tweakers.net/reviews/649/8/database-test-sun-ultrasparc-t1-vs-punt-amd-opteron-pagina-8.html
You can see that the Xeons fares much better compared to the UltraSparcs.
Another very interesting benchmark I found was a blog entry quoting official SAP benchmarks between x86 and SPARC hardware. The SAP benchmark shows the x86 servers to be faster compared to the Sun T2000 SPARC server with some limitations.
2 X Quad-Core Intel Xeon X5355 2.66 GHz - 9330 SAPS
www.sap.com/solutions/benchmark/pdf/cert4207.pdf
2 X Dual-Core Intel Xeon 5160 3 GHz - 5120 SAPS
www.sap.com/solutions/benchmark/pdf/cert3107.pdf
Sun Fire Model T2000 - 1 processor / 8 cores / 32 threads - 4780 SAPS
www.sap.com/solutions/benchmark/pdf/cert4705.pdf
You should go ahead and read the reservations made by the author of the above post. They are all valid. Just keep in mind that the Sparc system is a $33,000 server compared to a much cheaper HP.
Of course I’m only talking about raw performance here. The x86/Linux hardware has several other advantages such as being more open, more future-proof and arguably easier and cheaper to service and maintain.
This is all very interesting stuff. I’ll continue to do more digging and update this post as necessary.
8th
OCT
Installing Oracle 9 on RHEL4
Posted by David Yahalom under Linux, Oracle
Installing Oracle 9i on RHEL4 isn’t difficult but requires a certain set of pre-installation actions that aren’t very well documented in the Oracle official installation readme.
This could lead to allot of frustration and hair pulling during installation if you don’t follow the exact set of actions described in this document.
The following errors are known errors which may appear during the Oracle 9i installation on RHEL4. Usually, the cause for these problems is a bad configuration or package dependency at the O/S level. These errors can usually be easily fixed but following the procedure described in this document.
compat-gcc-32 is needed by compat-oracle-rhel4-1.0.5.i386 error invoking target 'install' of makefile $ORACLE_HOME/sqlplus/lib/ins_sqlplus.mk error invoking target relink of makefile $ORACLE_HOME/precomp/lib/ins_precomp.mk GLIBC_2.0 not defiend in file libc.so.6 with link time reference...
Installing RHEL4/ CentOS 4.1
Continue to installing RHEL4/CentOS 4.1 normally as you would usually do just make sure that you have allocated at least 2GB of swap space, disabled SE Linux (THIS IS CRITICAL) and installed the following packages:
X Window System, GNOME, Editors, Server configuration tools, Administration tools, development tools and system tools.
Create users and groups:
As with any Oracle installation we will need to create two groups and one user before we can continue with the installation.
To do so we will run the following commands as root:
groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle passwd oracle
This creates two Linux groups named oinstall and dba and a user called Oracle that is made a member of these two groups.
Create the directory structure:
Before we extract and install the Oracle software we will need to create the directory structure first. You can obviously use any directory structure you want but the dir structure I’m using here is popular amongst many DBAs.
Run the following commands as root:
mkdir /oracle mkdir /oracle/9i chown -R oracle:oinstall /oracle mkdir /osource chown -R oracle:oinstall /osource
This creates two directories (/oracle and /osource). The oracle home will be located in /oracle and the raw installation files in /osource.
Now we will edit the bash_profile file for the Oracle user located in /home/oracle/.bash_profile and add the following lines at the end:
#### Oracle 9i parameters #### ORACLE_BASE=/oracle ORACLE_HOME=/oracle/9i ORACLE_SID=[ENTER SID NAME HERE] PATH=$ORACLE_HOME/bin:$PATH:. LD_LIBRARY_PATH=$ORACLE_HOME/lib; CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib; LD_ASSUME_KERNEL=2.4.19;</code> export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH export LD_LIBRARY_PATH export CLASSPATH export LD_ASSUME_KERNEL
Download Oracle 9i for Linux:
Download the Oracle CDs from otn.oracle.com. The version I’m using in this tutorial is 9.2.0.4.
Beside the Oracle CDs you will also need to download an additional compatibility patch from Metalink. Patch number 4198954. This patch contains two RPMs that we need to install:
compat-oracle-rhel4-1.0-5.i386.RPM compat-libcwait-2.0-2.i386.RPM
But more on this later on. For now, just download the zip file from the note.
Save all files in the /osource directory we created earlier.
Unpacking the files:
After we have downloaded the Oracle CDs we will need to extract the files inside.
To do this run the following commands as the oracle user:
Cd /osource gunzip ship_9204_linux_disk1.cpio.gz gunzip ship_9204_linux_disk2.cpio.gz gunzip ship_9204_linux_disk3.cpio.gz
Followed by:
cpio -idmv < ship_9204_linux_disk1.cpio cpio -idmv < ship_9204_linux_disk2.cpio cpio -idmv < ship_9204_linux_disk3.cpio
(CPIO is an archive utility usually used for tape backups. You can read more about it here.)
After successful completion of the above steps you should now have three directories inside /osource named “Disk1″, “Disk2″ and “Disk3″.
Configure host parameters:
Make sure /etc/hosts contains a FQN of this server. If the hostname of the server isn’t pingable from the server itself, you’ll have problems later on.
[IP_ADDR] [FQ machine name] [machine name]
Configure kernel Parameters:
Login as root and add the following lines to /etc/sysctl.conf file:
kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_max = 262144
Make sure there is a cartridge return after the last line. This is important.
Save the file and run /sbin/sysctl -p to apply the new values to the currently running host.
Add the following lines to /etc/security/limits.conf file:
oracle soft nofile 65536 oracle hard nofile 65536 oracle soft nproc 16384 oracle hard nproc 16384
Pre installation configuration:
As with Metalink note 303859.1 there are additional packages required before we can continue with our Oracle installation.
All the required packages are on the RHEL CDs but they might not have been installed during the initial O/S installation (depending on the selections you
made during package selection).
RHEL Disk 2 / Centos 4.1 Disk 1
cd /media/cdrom/CentOS/RPMS
OR
cd /media/cdrom/RedHat/RPMS
rpm -Uvh xorg-x11-deprecated-libs-6* rpm -Uvh make-3* rpm -Uvh compat-libstdc++-33-3*
RHEL Disk 3 / Centos 4.1 Disk 2
cd /media/cdrom/CentOS/RPMS
OR
cd /media/cdrom/RedHat/RPMS
rpm -Uvh xorg-x11-devel* rpm -Uvh xorg-x11-deprecated-libs-devel-6* rpm -Uvh gcc-c++-3* rpm -Uvh gnome-libs-1* rpm -Uvh freetype-devel* rpm -Uvh compat-db* rpm -Uvh gcc-3* rpm -Uvh fontconfig-devel*
RHEL Disk 4 / Centos 4.1 Disk 3
cd /media/cdrom/CentOS/RPMS
OR
cd /media/cdrom/RedHat/RPMS
rpm -Uvh compat-libgcc-296-2* rpm -Uvh openmotif21-2* rpm -Uvh compat-gcc-32-c++-3* rpm -Uvh compat-gcc-32-3* rpm -Uvh compat-libstdc++-296-2* rpm -Uvh libaio-devel-0* rpm -Uvh libaio-0* rpm -Uvh gnome-libs-devel-1*
It is okay if during installations of some of these packages you’ll receive a message indicating some of these packages are already installed.
Now we’ll install the Metalink patch (4198954) we downloaded earlier. Extract the two packages located in the patch and run the following commands:
rpm -Uvh compat-libcwait-2* rpm -Uvh compat-oracle-rhel4-1*
Be advised that the second rpm is actually only a placeholder for checking if certain RPMs are installed on your system. If during the installation of either of the two RPMs above you get an error indicating a dependency error (such as “compat-gcc-32 is needed by compat-oracle-rhel4-1.0.5.i386″) DO NOT CONTINUE! Go back to the beginning of this document and check if there was anything you may have accidentally missed. The installation will not work otherwise.
Installation:
Now you are ready to continue with the graphical installation of Oracle 9.
Category Cloud
ASM Bug DB2 LUW ETL General IT Grid Control Hardware ITIL Linux Monitoring MySQL Oracle RAC Security Solaris SQL Server Storage Tuning Uncategorized Unix Windows
Recent Posts
- Understand database buffer cache usage
- Expdp fails with ORA-01427
- How to trace an Oracle session from another session
- Increasing DML speed and throughput
- Temporary tablespace usage in Oracle
Active polls
Categories
- ASM (2)
- Bug (1)
- DB2 LUW (11)
- ETL (2)
- General IT (7)
- Grid Control (1)
- Hardware (4)
- ITIL (1)
- Linux (3)
- Monitoring (1)
- MySQL (1)
- Oracle (37)
- RAC (5)
- Security (3)
- Solaris (3)
- SQL Server (1)
- Storage (1)
- Tuning (1)
- Uncategorized (1)
- Unix (2)
- Windows (2)
Archives
- January 2011
- October 2010
- September 2010
- September 2009
- February 2009
- January 2009
- November 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- October 2007
- September 2007
- July 2007
- June 2007
- April 2007
- March 2007
- February 2007
- January 2007
- March 2006
Blogroll
DavidYahalom.com - Oracle, Databases, SQL, news, views, articles and in-depth analysis is powered by Wordpress. Designed by Free WordPress Themes.
