473,405 Members | 2,279 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,405 software developers and data experts.

Should system temporary tablespaces generally be on automaticstorage?

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 where imported into the exact same
table/view/trigger structures (but with slightly different tablespace
configuration, see later). The involved hardware was different (one
running on x86_64, one running on PPC), but with comparable CPU, memory
and I/O assignments.

The update running on one of the servers was performing extremely bad:
Even though the import was consuming 5 CPU cores, the import ran for more
than a week: On the other server, the import on the other server ran for
less than a day. I couldn't make any sense out of it, until I saw a
difference:
On the fast server, there was a "Buffer pool temporary data logical
reads" / "Buffer pool data logical reads" ratio of 10. On the slow server,
the same ratio was 30.

This led me to compare the temporary tablespaces on the two servers. I has
added 8KB system temporary tablespaces on both databases, but it turned
out that I had done it differently. The fast server was using automatic
storage, while the slow server was using non-automatic, database managed
storage. The slow database's temporary tablespace was rather large (25GB),
to I doubt that the size of the tablespace was contributing to the
problem. Actually, when looked at the actual size of the temporary
tablespace on the fast server, the involved files didn't seem to take up
more than a gigabyte of data.

I interrupted the import on the slow system, and re-created the 8KB system
temporary tablespace, this time using automatic storage. Now, a subsequent
import ran as fast as on the fast system.

How can this be? I always thought that automatic storage would be a bit
_slower_ than DMS tablespaces.

Is there any merit to concluding that system temporary storage should
generally reside on automatic storage?

--
Troels
Nov 20 '08 #1
6 3274
Hi!

From my talks with DB2 guys I can say that everything should be
automatic storage on SMS, not DMS.

Best regards,
Kovi

Troels Arvin pravi:
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 where imported into the exact same
table/view/trigger structures (but with slightly different tablespace
configuration, see later). The involved hardware was different (one
running on x86_64, one running on PPC), but with comparable CPU, memory
and I/O assignments.

The update running on one of the servers was performing extremely bad:
Even though the import was consuming 5 CPU cores, the import ran for more
than a week: On the other server, the import on the other server ran for
less than a day. I couldn't make any sense out of it, until I saw a
difference:
On the fast server, there was a "Buffer pool temporary data logical
reads" / "Buffer pool data logical reads" ratio of 10. On the slow server,
the same ratio was 30.

This led me to compare the temporary tablespaces on the two servers. I has
added 8KB system temporary tablespaces on both databases, but it turned
out that I had done it differently. The fast server was using automatic
storage, while the slow server was using non-automatic, database managed
storage. The slow database's temporary tablespace was rather large (25GB),
to I doubt that the size of the tablespace was contributing to the
problem. Actually, when looked at the actual size of the temporary
tablespace on the fast server, the involved files didn't seem to take up
more than a gigabyte of data.

I interrupted the import on the slow system, and re-created the 8KB system
temporary tablespace, this time using automatic storage. Now, a subsequent
import ran as fast as on the fast system.

How can this be? I always thought that automatic storage would be a bit
_slower_ than DMS tablespaces.

Is there any merit to concluding that system temporary storage should
generally reside on automatic storage?

--
____________________________
|http://kovica.blogspot.com|
-----------------------------~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Nov 20 '08 #2
Ian
Troels Arvin wrote:
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 where imported into the exact same
table/view/trigger structures (but with slightly different tablespace
configuration, see later). The involved hardware was different (one
running on x86_64, one running on PPC), but with comparable CPU, memory
and I/O assignments.

The update running on one of the servers was performing extremely bad:
Even though the import was consuming 5 CPU cores, the import ran for more
than a week: On the other server, the import on the other server ran for
less than a day. I couldn't make any sense out of it, until I saw a
difference:
On the fast server, there was a "Buffer pool temporary data logical
reads" / "Buffer pool data logical reads" ratio of 10. On the slow server,
the same ratio was 30.
That is definitely interesting, but what about physical data
reads/writes? How do those compare? If you compare only
logical data reads, you're looking only at data data coming
from the bufferpool, and the storage configuration doesn't
affect this.

I would also dig into *why* you have 3 times more temporary data
reads. If you have the same access path on both servers, something
is going wrong. Are there lots more sort overflows on the slow
server? (These would translate into reads/writes on temp
tablespaces).
This led me to compare the temporary tablespaces on the two servers. I has
added 8KB system temporary tablespaces on both databases, but it turned
out that I had done it differently. The fast server was using automatic
storage, while the slow server was using non-automatic, database managed
storage. The slow database's temporary tablespace was rather large (25GB),
to I doubt that the size of the tablespace was contributing to the
problem. Actually, when looked at the actual size of the temporary
tablespace on the fast server, the involved files didn't seem to take up
more than a gigabyte of data.
Have you compared the average I/O service times for the tablespaces on
both systems? What did you find?

How many containers did you have when the temp tablespace was DMS?
compared with how many storage paths you had in the database?
I interrupted the import on the slow system, and re-created the 8KB system
temporary tablespace, this time using automatic storage. Now, a subsequent
import ran as fast as on the fast system.

How can this be? I always thought that automatic storage would be a bit
_slower_ than DMS tablespaces.

Is there any merit to concluding that system temporary storage should
generally reside on automatic storage?
Automatic storage is implemented as DMS File (for regular/long
tablespaces) and as SMS (for user or system temporary tablespaces).
Automatic storage just controls *where* the containers get placed.

So the question should probably be, 'should a temporary tablespace
be SMS or DMS?'. But, in this case, I'd bet there is something
else going on.

Nov 20 '08 #3
Gregor Kovac( wrote:
From my talks with DB2 guys I can say that everything should be
automatic storage on SMS, not DMS.
This is certainly sweet music to my DBA ears. But it sort of breaks
"conventional wisdom" which seems to state that DMS-tablespaces give
optimal performance.

Does someone (IBM?) have information with performance data from actual,
thorough testing across different workloads/platforms/configurations, so
that the choice doesn't have to rely on ad-hoc wisper and different
versions of conventional wisdom?

--
Troels
Nov 20 '08 #4
Ian wrote:
>On the fast server, there was a "Buffer pool temporary data logical
reads" / "Buffer pool data logical reads" ratio of 10. On the slow
server, the same ratio was 30.

That is definitely interesting, but what about physical data
reads/writes?
Those were roughly equal. The only numbers which stood out were the
differences in buffer pool temporary data.

On the slow server, I had tried to get clues from the health center, from
memory distributions, db2diag-log-reading, etc. Even stracing db2sync
didn't give a clue.
I would also dig into *why* you have 3 times more temporary data reads.
So would I. But: 3 times more temporary data reads on the slow server
didn't explain why the slow server was _much_, _much_ slower than the
fast one.
If you have the same access path on both servers
I didn't compare access plans. I hope to get a chance to do that at some
point.
Have you compared the average I/O service times for the tablespaces on
both systems? What did you find?
No. How would you do that?
How many containers did you have when the temp tablespace was DMS?
Only one container. But that container was on SAN with many involved
spindles. And as far as I remember, iostat reported of very light I/O.
(But CPU usage was heavy).

By the way: The slow server ran on PPC. Comparing CPU speed using bzip2
and compress (outputting to /dev/null) indicated that each core on the
PPC server were somewhat slower than each core on the x86_64 server (the
PPC server is also somewhat older). But the database on the PPC server
had access to more CPU cores (which it used), so I guess that somehow
makes for a even playing field.

I hope to get a chance to perform more controlled comparisons later, so I
can be less vague in the descriptions.

--
Troels
Nov 20 '08 #5
"Troels Arvin" <tr****@arvin.dkwrote in message
news:gg**********@news.net.uni-c.dk...
This is certainly sweet music to my DBA ears. But it sort of breaks
"conventional wisdom" which seems to state that DMS-tablespaces give
optimal performance.

Does someone (IBM?) have information with performance data from actual,
thorough testing across different workloads/platforms/configurations, so
that the choice doesn't have to rely on ad-hoc wisper and different
versions of conventional wisdom?

--
Troels
You may be misinterpreting the poster, or the poster may be incorrect.
Perhaps he meant that all SMS tablespaces should be automatic storage.

In version 9.5 (maybe 9.1?) if you create a new database, the SYSCAT and
USERSPACE1 tablespaces are DMS with automatic storage by default, so I doubt
that IBM thinks SMS is the preference for all storage. In version 8.2 these
were SMS by default.

Obviously, when you create a system temporary tablespace, SMS is preferred
because DMS spends extra time trying to optimize the placement of the table
in the tablespace. Spending extra time optimizing the physical placement of
the table in the tablespace is fine if the table is created once and used
many times. But in a system temporary tablespace, the work table created by
DB2 only lasts the duration of the SQL statement, and it is not worthwhile
to have DB2 spend extra time finding the optimal physical placement of the
table in a system temporary tablespace.
Nov 21 '08 #6
Ian
Troels Arvin wrote:
Ian wrote:
>I would also dig into *why* you have 3 times more temporary data reads.

So would I. But: 3 times more temporary data reads on the slow server
didn't explain why the slow server was _much_, _much_ slower than the
fast one.
Also: What were the transferrate / overhead settings for the tablespace
before and after the switch? These have some effect on the optimizer,
so perhaps this was causing it to choose a different plan.
>If you have the same access path on both servers

I didn't compare access plans. I hope to get a chance to do that at some
point.
This is probably one of the most important things to look at.
>Have you compared the average I/O service times for the tablespaces on
both systems? What did you find?

No. How would you do that?
avg I/O read time =
total buffer pool read time / (physical data+index+temp reads)

avg I/O write time =
total buffer pool write time / (physical data+index writes)
>How many containers did you have when the temp tablespace was DMS?

Only one container. But that container was on SAN with many involved
spindles. And as far as I remember, iostat reported of very light I/O.
(But CPU usage was heavy).
Still, something doesn't make sense: If the app is primarily CPU bound,
I/O configuration shouldn't make a big difference. But as you said,
switching from a single container DMS tablespace to automatic storage
(which is SMS; and you didn't say how many storage paths your database
had) resolved the issue. So I would again come back to the explain
plan.
Ian

Nov 21 '08 #7

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

Similar topics

1
by: gecho | last post by:
New to oracle, but I'm coming from the sybase side. I took over one of our oracle production databases (1.5 Tb) while the regular dba is out. I got errors (unable to extend temp segment) for two...
2
by: Chris Aitchison | last post by:
Hello, I am attempting to have a class that I have written serialize so that it can be both passed as a parameter or return value for a webservice, and also be serialized to disk using the...
18
by: zebi | last post by:
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
10
by: rAinDeEr | last post by:
Hi, I am trying to create around 70 tablespaces for around 100 tables.. Am using DB2 UDB 8.2 in Linux environment... This is one i generated through Control centre.... CREATE REGULAR...
3
by: dcruncher4 | last post by:
DB2 8.2.3 the task I have is to write a script to restore a database from a backup on to another machine. the backup can be as old as seven years. The container layout on the machine to be...
1
by: Sam Durai | last post by:
Env: DB2 v9.1 Server / Win XP. DB is enabled for Archival Logging. Was playing around with rebuild tablespace feature. My database 'CARD' has tablespace named t1,t2,t3. Taken couple of...
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...
8
by: alexhguerra | last post by:
Hello If im not missing something, when looking into directories that are SMS containers i can see multiple files, one for table data, one for indexes and other for lobs. Is there any special...
0
by: rajdb2 | last post by:
There is no option to specify use tempspace for reorg indexes all in V8 FP 12. is there any way We can force the use of temporary tablespace with reorg indexes all command? There is a space...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.