Lab 01 Setup and Introduction: IBM DB2 10.5 BLU Acceleration Proof of Technology Environment

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 13

Lab 01 - Setup and Introduction IBM Software

Lab 01 Setup and Introduction


IBM DB2 10.5 BLU Acceleration Proof of Technology Environment
This session is organized with a goal that you get first-hand experience working with the IBM
DB2 10.5 BLU Acceleration, using an IBM provided laptop/workstation and working through the
labs.

Since we are running a VM from a laptop using a single hard drive, this proof of
technology is not a demonstration of the performance, but hands on exercises. So, please
be patient working through the lab exercises, as it may take a little longer for the commands to
run.

Expectation from this Proof of Technology


This Proof of Technology is geared mainly for the DBAs. The BLU acceleration feature is
transparent to the applications and end users.

What we did configure in the VM for you?


We used SLES-11 SP 2 to install the operating system in the VM.
We created 2 users db2psc, and db2das. We used db2psc as instance owner and db2das
as the DB2 administration server user. The password for both the users is password.
The root password is password.

Aliases for Lab Directories


 During the lab exercises, you will need to go to the different labs directory. Use aliases
such cd1 through cd10 to change the directory to avoid typing.

Alias Pointing to directory


cd1 /home/db2psc/pot_blu/01setup
cd2 /home/db2psc/pot_blu/02column
cd3 /home/db2psc/pot_blu/03data
cd4 /home/db2psc/pot_blu/04compress
cd5 /home/db2psc/pot_blu/05skip
cd6 /home/db2psc/pot_blu/06tune
cd7 /home/db2psc/pot_blu/07cognos
cd8 /tmp/root/ispc-v1.3.0-linux/examples
cd9 /opt/ibm/cognos/bin64
cd10 /opt/ibm/cognos/configuration/schema/content/db2

IBM DB2 10.5 BLU Acceleration Page 3


IBM Software Lab 01 – Setup and Introduction

For example: When you type cd1 from anywhere, the directory will be changed to 01setup.

Linux Tips
If you are new to the Linux environment, the following tips will help.
 As opposed to the Microsoft Windows, you have to click in a Linux GUI window to get its
focus, so that you can type the commands.
 You can type the clear command from the command line window to clear the contents.
 When you are typing in a command shell, after few characters, hit tab to auto complete
instead of typing the whole command. This will save you some typing.
 To close a command line window, you can either type exit followed by Enter or press
CTRL-D.
 The command that you need to type are bold faced such as:
$ ls –l
 If the command shown starts with $, please assume that you are running that command
as db2psc user.
 If the command shown starts with #, it is assumed that this command needs to run as
root.
 It is assumed that you will hit Enter after typing the command.

Installation of IBM DB2 10.5


We installed DB2 10.5 with DB2 instance db2psc.
 We will not be showing the software installation as it is an easy process.

Let’s get started


__1. On your laptop/workstation, DB2BLU VM is already running.

Page 4 An IBM Proof of Technology


Lab 01 - Setup and Introduction IBM Software

__2. When the VM machine powers on, it does the automatic login of the db2psc user.

__3. Click Computer  GNOME Terminal to open a command line terminal.

__4. Type-in cd1 to change the directory to 01setup.


$ cd1

Note: Please note that cd1 is an alias pointing to the 01setup directory.

IBM DB2 10.5 BLU Acceleration Page 5


IBM Software Lab 01 – Setup and Introduction

Explore Databases
__5. Run db2 list db directory to check databases that are already created in the VM.
$ db2 list db directory

Page 6 An IBM Proof of Technology


Lab 01 - Setup and Introduction IBM Software

__6. Please remember that the above 3 databases DB2DB, ROWDB and COLDB created in the Virtual
Machine will be used to show and compare DB2 BLU Acceleration throughout these labs.

DB2DB database Row organized uncompressed tables

ROWDB database Row organized compressed tables

COLDB database Column organized compressed tables

__7. Please note that three databases ROWDB, COLDB and DB2DB are already created using scripts
given in the 01setup directory. Type ls -1 to list scripts.
$ ls –l

__8. The scripts shown in the following table have already been run. Please do not run any script
as these have already been run to save the time for creating databases.

Script Name Purpose

setup01 Apply DB2 and TSA license for DB2 10.5

setup02 It runs setup03.sql and setup04.sql to create row organized


uncompressed tables in DB2DB database.

setup03.sql Table definition for row organized uncompressed tables for DB2DB database

setup04.sql Load script to load data in DB2DB database

setup05 It runs setup06.sql and setup07.sql to create row organized


compressed tables in ROWDB database.

setup06.sql Table definition for row organized compressed tables for ROWDB database

setup07.sql Load script to load data in ROWDB database

setup08 It runs setup09.sql and setup10.sql to create column organized tables


in COLDB database.

setup09.sql Table definition for column organized tables for COLDB database

setup10.sql Load script to load data in COLDB database

setup20 Create Optim Query Tuner objects in all 3 databases so that we could use

IBM DB2 10.5 BLU Acceleration Page 7


IBM Software Lab 01 – Setup and Introduction

Data Studio to tune queries

DB2 BLU Acceleration using Single Instruction Multiple Data


__9. DB2 10.5 exploits Intel® CPU capability of Single Instruction Multiple Data (SIMD). Intel
introduced an instruction set extension with the Intel® Pentium® III processor called Intel®
Streaming SIMD Extensions (Intel® SSE). The latest Intel SSE revision (Version 4.2) can be
found on Intel Core™ i7 processor.

__10. Intel® Processor Identification Utility (download from www.intel.com) can be used to determine
the capabilities of the CPU. We ran this utility for this VMware machine and the output is as
shown.

__11. Please note that the Intel® Streaming SIMD Extensions (Intel® SSE) support is indicated in the
above output.

Note: You can download the Intel processor Identification Utility from
http://www.intel.com/p/en_US/support/highlights/processors/toolspiu and
check SSE support in your environment.

__12. Login as root. Type su – and type password as password.


$ su -

Page 8 An IBM Proof of Technology


Lab 01 - Setup and Introduction IBM Software

__13. Type cat /proc/cpuinfo


# cat /proc/cpuinfo

__14. Please notice that different variant of Intel® Streaming SIMD Extensions (Intel® SSE) are
mentioned in the flags field which confirms that the Intel CPU supports SIMD instructions.

__15. Run command cd8 to change directory to /tmp/root/ispc-v1.3.0-linux/examples


which contains the sample SIMD programs which we downloaded from http://www.intel.com.
# cd8

__16. There are several examples given and we will run 2 of them to see SIMD processing cycles.

__17. Change directory to mandelbrot.


# cd mandelbrot

IBM DB2 10.5 BLU Acceleration Page 9


IBM Software Lab 01 – Setup and Introduction

Page 10 An IBM Proof of Technology


Lab 01 - Setup and Introduction IBM Software

__18. Run make.


# make

__19. After program mandelbrot is built, run it.


# ./mandelbrot

__20. From the above output, please notice that the C/C++ program generates an image file using
SIMD processing and serial processing (without using SIMD). Please note that the program uses
33 million cycles by using SIMD processing compared to 246 million cycles without using SIMD
processing. Both program generates an identical image file.

__21. Please also note by using SIMD processing, it uses 7.33 times less CPU cycles to generate the
same image.

__22. Type ls –l *.ppm


# ls –l *.ppm

IBM DB2 10.5 BLU Acceleration Page 11


IBM Software Lab 01 – Setup and Introduction

__23. Type eog mandelbrot-ispc.ppm to see the image.


# eog mandelbrot-ispc.ppm

__24. Click x as shown above to close the image.

__25. Change directory to the cd ../volume_rendering.


# cd ../volume_rendering

Page 12 An IBM Proof of Technology


Lab 01 - Setup and Introduction IBM Software

__26. Run make.


# make

__27. Type ./volume to run the program. It shows the usage.


# ./volume

__28. Type ./volume camera.dat density_highres.vol


# ./volume camera.dat density_highres.vol

__29. Please note that the SIMD processing using 1 core of CPU takes 12661 million cycles to
generate the image. It takes 3976 million cycles using multi-core SIMD processing. Without
using SIMD processing, it takes 72641 million cycles to generate the same image.

__30. Please also note that the single core SIMD processing speeds up by 5.74 times and multi-core
SIMD processing speeds up by 18.27 times.

IBM DB2 10.5 BLU Acceleration Page 13


IBM Software Lab 01 – Setup and Introduction

__31. Run eog volume-serial.ppm to check the image which was generated by the program.
# eog volume-serial.ppm

__32. Click x to close the program.

Page 14 An IBM Proof of Technology


Lab 01 - Setup and Introduction IBM Software

__33. Type exit to close the root session.


# exit

__34. After running the above sample programs, we have seen the benefit of SIMD processing.

__35. The following algorithms benefit from the SIMD processing.

__a. Image processing and graphics

__b. Digital Signal Processing

__c. Digest, hashing and encoding

__d. Simulation of physical systems

__36. DB2 10.5 BLU Acceleration uses encoding algorithm to compress columnar data and column
compression is turned on by default when using column organized tables.

__37. After running the second example, we noticed that SIMD processing achieves far better results
when using multiple CPU cores.

__38. DB2 10.5 BLU Acceleration benefits from more number of cores and more memory.

__39. Keep GNOME Terminal open as we will need it for the next lab.

__40. Type clear.


$ ./clear

** End of Lab 01 - Setup and Introduction.

IBM DB2 10.5 BLU Acceleration Page 15

You might also like