473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Temporary Tablespace type to encrease performance

hello,

What's your opinion :
The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 /
multiprocessor ) is DMS ou SMS ?

Thanks

ZEB
Nov 12 '05 #1
18 8718
"zebi" <ze**@titi.org> wrote in message news:bm**********@news.tiscali.fr...
hello,

What's your opinion :
The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 /
multiprocessor ) is DMS ou SMS ?

Thanks

ZEB

Best is DMS, but make absolutely sure it is plenty large enough. Several
times the size of the largest table is not unreasonable. Try to create
multiple containers, each on different disk drives or different disk arrays.
Nov 12 '05 #2
Thanks

Do you know he impact of the type of temporary tablespaces (only the
tempspace) for the performance ?

"Mark A" <ma@switchboard.net> a écrit dans le message de news:
9S*****************@news.uswest.net...
"zebi" <ze**@titi.org> wrote in message news:bm**********@news.tiscali.fr...
hello,

What's your opinion :
The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 /
multiprocessor ) is DMS ou SMS ?

Thanks

ZEB

Best is DMS, but make absolutely sure it is plenty large enough. Several
times the size of the largest table is not unreasonable. Try to create
multiple containers, each on different disk drives or different disk

arrays.

Nov 12 '05 #3
"zebi" <ze**@titi.org> wrote in message news:bm**********@news.tiscali.fr...
Thanks

Do you know he impact of the type of temporary tablespaces (only the
tempspace) for the performance ?

If you do it right (with containers on separate drives/arrays) then you get
striping of disk, and better disk subsystem throughput. Multiple containers
on separate disk/arrays also enables intra-partition parallelism (if certain
parms are set in DB2). This works especially well if you have multiple
CPU's.
Nov 12 '05 #4
Depends on what you mean by "best" - for DB2 performance benchmarks
(TPC-C and TPC-H) DMS is often used. For administration and optimal use
of space, SMS has advantage for temps. The reasons are explained here:

http://www7b.boulder.ibm.com/dmdd/li..._adamache.html

If you want to see the type of tablespaces used in IBM DB2 AIX
benchmarks, see:

http://www.tpc.org/results/FDR/tpch/...60proc_FDR.pdf

and

http://www.tpc.org/results/FDR/TPCC/...r_06302003.pdf

(Look in the appendixes for tablespace set up - I think it's usually
Appendix B).
zebi wrote:
hello,

What's your opinion :
The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 /
multiprocessor ) is DMS ou SMS ?

Thanks

ZEB


Nov 12 '05 #5
We never recommend that temp table spaces be anything but SMS. There may be additional overhead for TEMP table spaces on DMS and the rule-of-thumb is always to use SMS.

--

Bob
Consulting I/T Specialist
IBM Toronto Lab
IBM Software Services for Data Management
"zebi" <ze**@titi.org> wrote in message news:bm**********@news.tiscali.fr...
hello,

What's your opinion :
The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 /
multiprocessor ) is DMS ou SMS ?

Thanks

ZEB
Nov 12 '05 #6
> "Bob [IBM]" <No**********@ibm.com> wrote in
message news:bm**********@news.btv.ibm.com...
We never recommend that temp table spaces be anything but
SMS. There may be additional overhead for TEMP table
spaces on DMS and the rule-of-thumb is always to use SMS.
Bob
Consulting I/T Specialist
IBM Toronto Lab
IBM Software Services for Data Management


In the TPC-H benchmark submitted by IBM in July 2003 using a 100GB database
(which now owns the performance record for this size database), a DMS
temporary tablespace was used. See page 77 of the following document (the
IBM page number, not the PDF page number):

http://www.tpc.org/results/FDR/tpch/...030810.fdr.pdf

The system was as follows:

IBM eServer 325 8-node cluster
Database Manager: IBM DB2 UDB 8.1 ESE with DPF
Operating System: SuSE Linux 8.1
Nov 12 '05 #7
"Mark A" <ma@switchboard.net> writes:
"zebi" <ze**@titi.org> wrote in message news:bm**********@news.tiscali.fr...
hello,

What's your opinion :
The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 /
multiprocessor ) is DMS ou SMS ?

Thanks

ZEB

Best is DMS, but make absolutely sure it is plenty large enough. Several
times the size of the largest table is not unreasonable. Try to create
multiple containers, each on different disk drives or different disk arrays.


Without knowing about the application, it is not possible to say which
is best, actually. The advantage of SMS tablespaces are that the
OS allocates disk space to them as needed, so you won't have to
administer the tablespace much as long as you don't run out of
disk space on the server. But Windows and Unix use indexed allocation
of disk blocks to files, which scatters the disk blocks of a file
all over the disk. In a database, this leads to more time to service
disk I/O requests because of more seek time-- this is especially
true for tables where sequential scans and index scans with clustered
indexes are running. When scanning sequentially, you get better performance
if the disk blocks where the tuples are stored are contiguous on the
disk. Since the operating system allocation of disk blocks to files
is not continguous with Unix or Windows, it is customary for a relational
DBMS to create tablespaces with large chunks of contiguous storage,
and manage the allocation of disk space out of these predefined
containers. Better designed systems support extents to the space
so that the system can find space when the original allocation
is fully utilized. But these types of tablespaces require more
administration.

So, the short answer is that DMS tablespaces perform better but
require more sysadmin work to keep them working and to keep them
organized for performance. SMS tablespaces require less administrative
work, but don't perform as well. If your application will perform
adequately with SMS temporary tablespaces and you don't have
gobs of free disk space just to make the temporary space huge,
then SMS is a fine choice. If performance is an issue, you'll want
DMS, and if you have lots of disk space, you can, as Mark noted,
make them quite large to minimize administrative overhead.

Cheers,

Joseph
Nov 12 '05 #8
Mark - I am fully aware of the benchmark .. but thanks as always for your insight. I still never suggest anything but SMS for the reason of never knowing if you will have enough space and also the additional overhead of using DMS table spaces. Of course, your mileage may vary. Have a great weekend!

--

Bob
Consulting I/T Specialist
IBM Toronto Lab
IBM Software Services for Data Management
"Mark A" <ma@switchboard.net> wrote in message news:_i*****************@news.uswest.net...
"Bob [IBM]" <No**********@ibm.com> wrote in
message news:bm**********@news.btv.ibm.com...
We never recommend that temp table spaces be anything but
SMS. There may be additional overhead for TEMP table
spaces on DMS and the rule-of-thumb is always to use SMS.
Bob
Consulting I/T Specialist
IBM Toronto Lab
IBM Software Services for Data Management


In the TPC-H benchmark submitted by IBM in July 2003 using a 100GB database
(which now owns the performance record for this size database), a DMS
temporary tablespace was used. See page 77 of the following document (the
IBM page number, not the PDF page number):

http://www.tpc.org/results/FDR/tpch/...030810.fdr.pdf

The system was as follows:

IBM eServer 325 8-node cluster
Database Manager: IBM DB2 UDB 8.1 ESE with DPF
Operating System: SuSE Linux 8.1
Nov 12 '05 #9
> "Bob [IBM]" <No**********@ibm.com
wrote in message news:bm**********@news.btv.ibm.com...
Mark - I am fully aware of the benchmark .. but thanks as always
for your insight. I still never suggest anything but SMS for the reason
of never knowing if you will have enough space and also the additional
overhead of using DMS table spaces. Of course, your mileage
may vary. Have a great weekend!


I am not sure what you mean by overhead, but I believe that the overall
performance is better on DMS, if set up in an optimal manner (each container
on its own drive or array).

DBA's do get fewer complaints with SMS because it is less likely to run out
of space. However, if one creates the temporary tablespaces with a
sufficient size (several times the largest table if possible) that is not
likely to happen. Disk space is cheap.
Nov 12 '05 #10
There is overhead for DMS incurred by going through the SMP and EMP ... and if I am not mistaken some synchronous writes occur during the creation of the temporary table if using DMS. Of course regardless of type, we all remember that it is not advantageous to have > 1 temporary table space of the same page size ...

Bob
Consulting I/T Specialist
IBM Toronto Lab
IBM Software Services for Data Management
[My comments are solely my own and are not meant to represent an official IBM position - ask my cat!]

"Mark A" <ma@switchboard.net> wrote in message news:tM****************@news.uswest.net...
"Bob [IBM]" <No**********@ibm.com
wrote in message news:bm**********@news.btv.ibm.com...
Mark - I am fully aware of the benchmark .. but thanks as always for your insight. I still never suggest anything but SMS for the reason
of never knowing if you will have enough space and also the additional overhead of using DMS table spaces. Of course, your mileage
may vary.


I am not sure what you mean by overhead, but I believe that the overall performance is better on DMS, if set up in an optimal manner (each container
on its own drive or array).

DBA's do get fewer complaints with SMS because it is less likely to run out of space. However, if one creates the temporary tablespaces with a
sufficient size (several times the largest table if possible) that is not likely to happen. Disk space is cheap.
Nov 12 '05 #11
> "Bob [IBM]" <No**********@ibm.com> wrote in message
There is overhead for DMS incurred by going through the SMP
and EMP ... and if I am not mistaken some synchronous writes occur
during the creation of the temporary table if using DMS. Of course
regardless of type, we all remember that it is not advantageous to
have > 1 temporary table space of the same page size ...
Bob


There is overhead on both DMS and SMS, but they may be in different areas.
You only mentioned the overhead attributable to DMS. Overall, DMS performs
better if set up properly with enough space to ensure that one does not run
out. I presume that is why the IBM benchmark team used DMS.
Nov 12 '05 #12


Mark A wrote:
"Bob [IBM]" <No**********@ibm.com> wrote in message
There is overhead for DMS incurred by going through the SMP
and EMP ... and if I am not mistaken some synchronous writes occur
during the creation of the temporary table if using DMS. Of course
regardless of type, we all remember that it is not advantageous to
have > 1 temporary table space of the same page size ...
Bob


There is overhead on both DMS and SMS, but they may be in different areas.
You only mentioned the overhead attributable to DMS. Overall, DMS performs
better if set up properly with enough space to ensure that one does not run
out. I presume that is why the IBM benchmark team used DMS.


AFAIK, only on SUN and Linux suggest using DMS as system temporary tablespace.
On Sun, you'd better use DMS raw device.
Nov 12 '05 #13
Can you elaborate on some of the overhead you see in SMS? I cannot state any specifically so would be interested in your experiences in the field in this area please.

--

Bob
Consulting I/T Specialist
IBM Toronto Lab
IBM Software Services for Data Management
[My comments are solely my own and are not meant to represent an official IBM position - ask my cat!]
"Mark A" <ma@switchboard.net> wrote in message news:C3****************@news.uswest.net...
"Bob [IBM]" <No**********@ibm.com> wrote in message
There is overhead for DMS incurred by going through the SMP
and EMP ... and if I am not mistaken some synchronous writes occur
during the creation of the temporary table if using DMS. Of course
regardless of type, we all remember that it is not advantageous to
have > 1 temporary table space of the same page size ...
Bob


There is overhead on both DMS and SMS, but they may be in different areas.
You only mentioned the overhead attributable to DMS. Overall, DMS performs
better if set up properly with enough space to ensure that one does not run
out. I presume that is why the IBM benchmark team used DMS.
Nov 12 '05 #14
"Bob [IBM]" <No**********@ibm.com> wrote in message
Can you elaborate on some of the overhead you see in SMS? I cannot
state any specifically so would be interested in your experiences in the
field in this area please.


I am not an expert in this area, although I have heard some discussion of
this topic, not all of which I remember in detail off-hand. I think it might
be beneficial to ask the DB2 Linux benchmark team about why they chose DMS
and whether they benchmarked different DMS vs SMS tablespace scenarios.

Someone earlier suggested that the DMS vs. SMS decision is operating system
dependent, so that would be something to follow up on also.

Nov 12 '05 #15
Benchmarks usually get done in a few weeks, so the advantages of
performance (which DMS sometimes delivers for temp tablespaces) over SMS
can be pronounced. The advantages of SMS (ease of administration,
ability to grow and shrink quickly) matter less in a benchmark, where
the workload is well understood and is completed quickly, versus a
database you will maintain for years. Finally, writing a benchmark kit
(i.e. a TPC-H kit or TPC-C kit) is a lot of work, so sometimes
performance benchmarks might stick with a choice they inherit if it
works okay - i.e. if I/O performed well on the original TPC-H (or TPC-D)
kit with DMS temps, they might leave that as is, and focus on other
query tuning and techniques (like MQT's) when running such a benchmark
on Linux.

There were once large performance advantages for raw over SMS for
relational databases - these advantages are shrinking, disappearing, or
even becoming advantages for SMS as disk caching techniques at the OS
and disk subsystem levels improve (and disk technologies like EMC and
Shark aim more at the needs of high end databases like DB2).

Mark A wrote:
"Bob [IBM]" <No**********@ibm.com> wrote in message
Can you elaborate on some of the overhead you see in SMS? I cannot
state any specifically so would be interested in your experiences in the
field in this area please.

I am not an expert in this area, although I have heard some discussion of
this topic, not all of which I remember in detail off-hand. I think it might
be beneficial to ask the DB2 Linux benchmark team about why they chose DMS
and whether they benchmarked different DMS vs SMS tablespace scenarios.

Someone earlier suggested that the DMS vs. SMS decision is operating system
dependent, so that would be something to follow up on also.


Nov 12 '05 #16
"Blair Adamache" <ba*******@2muchspam.yahoo.com> wrote in message
news:bn**********@hanover.torolab.ibm.com...
Benchmarks usually get done in a few weeks, so the advantages of
performance (which DMS sometimes delivers for temp tablespaces) over SMS
can be pronounced. The advantages of SMS (ease of administration,
ability to grow and shrink quickly) matter less in a benchmark, where
the workload is well understood and is completed quickly, versus a
database you will maintain for years. Finally, writing a benchmark kit
(i.e. a TPC-H kit or TPC-C kit) is a lot of work, so sometimes
performance benchmarks might stick with a choice they inherit if it
works okay - i.e. if I/O performed well on the original TPC-H (or TPC-D)
kit with DMS temps, they might leave that as is, and focus on other
query tuning and techniques (like MQT's) when running such a benchmark
on Linux.

There were once large performance advantages for raw over SMS for
relational databases - these advantages are shrinking, disappearing, or
even becoming advantages for SMS as disk caching techniques at the OS
and disk subsystem levels improve (and disk technologies like EMC and
Shark aim more at the needs of high end databases like DB2).


I agree about the administrative advantages of SMS over DMS. I think that
DMS is sometimes overused, especially for transaction systems with large
bufferpools.

However, tables created by DB2 in temporary tablespace are frequently
accessed with tablespace scans, which can be quite large in ad-hoc query or
data warehouse environments . I would suspect that there are advantages for
DMS in this type of environment, especially if one places the containers in
an optimal configuration.

To a large degree, the overhead associated with DBA maintenance activities
relating to DMS for temporary tablespaces can be minimized with a generous
allocation of space, especially since it is a shared space and disk is
cheap. Because of this, I suspect there is a better case to be made for use
of DMS for temporary tablespaces than regular tablespaces (which may require
more require frequent administration).
Nov 12 '05 #17
"Mark A" <ma@switchboard.net> writes:
DBA's do get fewer complaints with SMS because it is less likely to run out
of space. However, if one creates the temporary tablespaces with a
sufficient size (several times the largest table if possible) that is not
likely to happen. Disk space is cheap.


True, but you may have to do regular re-orgs to keep things contiguous if you
want to keep the performance advantage.

My policy is SMS is the standard for everything unless performance
constraints require better performance, but our installation is
not performance bound.

Joseph
Nov 12 '05 #18
> "Mark A" <ma@switchboard.net> writes:
DBA's do get fewer complaints with SMS because it is less likely to run outof space. However, if one creates the temporary tablespaces with a
sufficient size (several times the largest table if possible) that is not
likely to happen. Disk space is cheap.
True, but you may have to do regular re-orgs to keep things contiguous if

you want to keep the performance advantage.

My policy is SMS is the standard for everything unless performance
constraints require better performance, but our installation is
not performance bound.

Joseph


Temporary DB2 tables are created and dropped by DB2 during the SQL unit of
work. There is nothing to reorganize, or am I missing something?
Nov 12 '05 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ulrich Sprick | last post by:
Hi all, (DB2 V7.1 for WinNT) I am looking for a way to determine the free space in my tablespace (containers), but I can't find out. The tablespace in question is a system managed tablespace in...
11
by: Hemant Shah | last post by:
Folks, I have a perl script that creates and uses global termporary table. This script worked fine with UDB 7.2 on AIX. Sometime ago I moved the database to UDB 8 on Linux. The select statement...
5
by: N | last post by:
Hi, I got an error during load on a couple of the tables. And it seems to be complaining that I'm running out of tempspace (possibly during index rebuild). Below is the load command and error....
6
by: gimme_this_gimme_that | last post by:
I'm new to DB2 ... The following statement results in a SQL1585N message : "A system temporary table space with sufficient page size does not exist" Note that the column FIELD_DETAIL is a...
2
by: Andy S. | last post by:
Hi, I'm trying to declare and use temporary tables. I have written the following code in Java. Creating the tablespace (i can see the tablespace created using the Control Center), the temporary...
11
by: rawu | last post by:
hi , all . I got a question about creating indexes in db2 . a table has 44236333 rows an index planed to be build include 2 field ( 6 byte ) accordding to db2 document temporary...
1
by: nkumarin001 | last post by:
Hi, I created permanent tablespace with no objects in it so i tried to switch from permanent tablespace to temporary tablespace and i got the following error... SQL> alter tablespace student...
4
by: sandeep.iitk | last post by:
Hi, One query is failing on the database and its a long query which was running fine earlier. One possible reason we can think of is increase in data in tables in query. It is failing with...
6
by: Troels Arvin | last post by:
Hello, I have recently run a rather large data import where the imported data i pumped through some updatable views equipped with INSTEAD OF triggers. For various reasons, the exact same data...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.