473,394 Members | 1,718 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,394 software developers and data experts.

Memory Sharing between Databases

Hi,

I am wondering if the bufferpools and agent memory canbe shared within
a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our
business model requires us to add about 1-2 db's per month (one db per
customer), and this consume the memory.
Some of these dbs are not highly active but once a db is activated, at
least the bufferpools are allocated along with the init_pool of
agents. Is there a way for bufferpools and agents be shared between
databases, like other RDBMS do ?

Thank you and look forward to your answers.
Selma
Nov 12 '05 #1
13 1818
You could do maximum CPU and memory sharing by putting all the data in
one databases, and using a different schema for each customer. And, put
their data in distinct table spaces. Bufferpools are allocated by
database, so cannot be shared by different databases. However, if you
don't like the schema approach above, in v8 bufferpools for inactive
databases can be sized quite small.

Selma_g wrote:
Hi,

I am wondering if the bufferpools and agent memory canbe shared within
a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our
business model requires us to add about 1-2 db's per month (one db per
customer), and this consume the memory.
Some of these dbs are not highly active but once a db is activated, at
least the bufferpools are allocated along with the init_pool of
agents. Is there a way for bufferpools and agents be shared between
databases, like other RDBMS do ?

Thank you and look forward to your answers.
Selma


Nov 12 '05 #2
Thanks for your suggestion, Blair. However, our business contract
forbids mixing data between customers due to the sensitive nature of
the data. I am stuck creating 1-2 dbs a month. As I recall when I
worked in Sybase years ago, the memory space is shared globally. In
fact sybase claimed they can support something like 32K databases!
Does anyone have a solution for UDB? I can't size the less active dbs
small bufferpools because the customers may use it throughout the day.
Is this a weakness in UDB/DB2 in what otherwise an excellent db engine
?

Look forward to your answers.
Selma

Blair Adamache <ba*******@2muchspam.yahoo.com> wrote in message news:<c1**********@hanover.torolab.ibm.com>...
You could do maximum CPU and memory sharing by putting all the data in
one databases, and using a different schema for each customer. And, put
their data in distinct table spaces. Bufferpools are allocated by
database, so cannot be shared by different databases. However, if you
don't like the schema approach above, in v8 bufferpools for inactive
databases can be sized quite small.

Selma_g wrote:
Hi,

I am wondering if the bufferpools and agent memory canbe shared within
a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our
business model requires us to add about 1-2 db's per month (one db per
customer), and this consume the memory.
Some of these dbs are not highly active but once a db is activated, at
least the bufferpools are allocated along with the init_pool of
agents. Is there a way for bufferpools and agents be shared between
databases, like other RDBMS do ?

Thank you and look forward to your answers.
Selma

Nov 12 '05 #3
"Selma_g" <se*********@yahoo.com> wrote in message
news:a3**************************@posting.google.c om...
Thanks for your suggestion, Blair. However, our business contract
forbids mixing data between customers due to the sensitive nature of
the data. I am stuck creating 1-2 dbs a month. As I recall when I
worked in Sybase years ago, the memory space is shared globally. In
fact sybase claimed they can support something like 32K databases!
Does anyone have a solution for UDB? I can't size the less active dbs
small bufferpools because the customers may use it throughout the day.
Is this a weakness in UDB/DB2 in what otherwise an excellent db engine
?

Look forward to your answers.
Selma

Sounds to me like a definition issue. If Sybase databases can share
bufferpools, then maybe their databases are not as separate as DB2 LUW
databases. DB2 for OS/390 database share bufferpools (apparently like
Sybase) and you can have up to 65217 databases, but DB2 for UNIX, Linux, and
Windows databases do not share bufferpools (as you know).

Maybe you are fixated on the term "database" (which has different meanings
for different DBMS products) and you should be able to provide the required
security with multiple users having their own schema with a single database.
Nov 12 '05 #4
Selma,

You may want to aks for a clarification of the contract.
After all if you share teh buffer pool, don't you share the data?
It's sitting there darn close together.
As Mark points out we are talking definitions here.
Commonly a database in Sybase and MS SQL Server is best mapped to a
schema in DB2.

Just create a schema per customer, don't allow any of the users of one
schema to access any objects in the other. If you want to be paranoid
you can even withdraw select privileges from the catalogs (which in
Sybase would have been shared as well, btw).

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #5
Hi,

One thing springs to mind to me, is handling backups and restores for
different customers if they are only in different schemas and not
different DBs.

i.e if you have to restore customer A db, you probably don't want to affect
everybody else.

So, maybe you need to have seperate tablespace backups etc.....

just a thought.

Paul.
Nov 12 '05 #6
pa**@abacus.co.uk (Paul Reddin) wrote in message news:<1f**************************@posting.google. com>...
Hi,

One thing springs to mind to me, is handling backups and restores for
different customers if they are only in different schemas and not
different DBs.

i.e if you have to restore customer A db, you probably don't want to affect
everybody else.

So, maybe you need to have seperate tablespace backups etc.....

just a thought.

Paul.


Yes, tablespace backups would be needed customer to customer. I am not
sure I can sell this to management. Maybe I can compare this to the
cost of adding new AIX boxes ! Still this is living dangerously
because one schema name mistake we could load $$$ into bank A when
it's intended for bank B. Or subtract $$$ when we shouldn't have, and
incur customer's retribution for lost interests$, use of fund. I think
that is a hard sell !

Would partition db be an answer ?
Selma
Nov 12 '05 #7
Mark A is quite right - "database" means something different to every
RDBMS vendor - it even has a different meaning on DB2 zOS versus DB2 on
Linux/UNIX/Windows (where we have instance support).

FWIW (all at the instance level):

The following parts of DB2 use shared memory:

- bufferpools
- lock list
- package cache
- shared sorts
- database heap
- log buffer
- catalog cache
- utility heap (util_heap_sz)

The following parts of DB2 are in an agent's private memory:

- private sorts
- application heap
- agent stack
- query heap
- statement heap

Selma_g wrote:
Thanks for your suggestion, Blair. However, our business contract
forbids mixing data between customers due to the sensitive nature of
the data. I am stuck creating 1-2 dbs a month. As I recall when I
worked in Sybase years ago, the memory space is shared globally. In
fact sybase claimed they can support something like 32K databases!
Does anyone have a solution for UDB? I can't size the less active dbs
small bufferpools because the customers may use it throughout the day.
Is this a weakness in UDB/DB2 in what otherwise an excellent db engine
?

Look forward to your answers.
Selma

Blair Adamache <ba*******@2muchspam.yahoo.com> wrote in message news:<c1**********@hanover.torolab.ibm.com>...

You could do maximum CPU and memory sharing by putting all the data in
one databases, and using a different schema for each customer. And, put
their data in distinct table spaces. Bufferpools are allocated by
database, so cannot be shared by different databases. However, if you
don't like the schema approach above, in v8 bufferpools for inactive
databases can be sized quite small.

Selma_g wrote:

Hi,

I am wondering if the bufferpools and agent memory canbe shared within
a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our
business model requires us to add about 1-2 db's per month (one db per
customer), and this consume the memory.
Some of these dbs are not highly active but once a db is activated, at
least the bufferpools are allocated along with the init_pool of
agents. Is there a way for bufferpools and agents be shared between
databases, like other RDBMS do ?

Thank you and look forward to your answers.
Selma


Nov 12 '05 #8
> Yes, tablespace backups would be needed customer to customer. I am not
sure I can sell this to management. Maybe I can compare this to the
cost of adding new AIX boxes ! Still this is living dangerously
because one schema name mistake we could load $$$ into bank A when
it's intended for bank B. Or subtract $$$ when we shouldn't have, and
incur customer's retribution for lost interests$, use of fund. I think
that is a hard sell !

Would partition db be an answer ?
Selma


No, a partitioned database just mean that a given table is partitioned
across multiple nodes so that SQL statements can operated in parallel on the
data. The partitioning of a table is done on a pseudo-random fashion based
on a hashing algorithm. This much worse than have separate tables in
separated schemas for your situation.

I am not sure what the difference is between accidentally referencing the
wrong database vs. referencing the wrong the schema (which is the high level
qualifier for the table).
Nov 12 '05 #9
Somebody pinged me yesterday about your question and suggested that if
the database is seldom active, but you could predict when access could
take place, you could get a table for the customer into the bufferpool
by doing some SQL that touches all rows (i.e. forces a table scan).

There are good features in v8, such as dynamically changing the sizes of
bufferpools, that would help with the problem you face.

Selma_g wrote:
Hi,

I am wondering if the bufferpools and agent memory canbe shared within
a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our
business model requires us to add about 1-2 db's per month (one db per
customer), and this consume the memory.
Some of these dbs are not highly active but once a db is activated, at
least the bufferpools are allocated along with the init_pool of
agents. Is there a way for bufferpools and agents be shared between
databases, like other RDBMS do ?

Thank you and look forward to your answers.
Selma


Nov 12 '05 #10
Blair and All,

Dynamically changing bufferpool sizes in V8 - that has possibility. V8
allows me to do that without forcing off all apps in a particular db ?
If that is the case i can build some intellegence into monitoring db
activities and dynamically adjust BP according to load. Has anyone
done that ?

Selma
Blair Adamache <ba*******@2muchspam.yahoo.com> wrote in message news:<c1**********@hanover.torolab.ibm.com>...
Somebody pinged me yesterday about your question and suggested that if
the database is seldom active, but you could predict when access could
take place, you could get a table for the customer into the bufferpool
by doing some SQL that touches all rows (i.e. forces a table scan).

There are good features in v8, such as dynamically changing the sizes of
bufferpools, that would help with the problem you face.

Selma_g wrote:
Hi,

I am wondering if the bufferpools and agent memory canbe shared within
a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our
business model requires us to add about 1-2 db's per month (one db per
customer), and this consume the memory.
Some of these dbs are not highly active but once a db is activated, at
least the bufferpools are allocated along with the init_pool of
agents. Is there a way for bufferpools and agents be shared between
databases, like other RDBMS do ?

Thank you and look forward to your answers.
Selma

Nov 12 '05 #11
You can read about ALTER BUFFERPOOL here:

http://publib.boulder.ibm.com/infoce...help/index.jsp

Search on "alter bufferpool statement".

Selma_g wrote:
Blair and All,

Dynamically changing bufferpool sizes in V8 - that has possibility. V8
allows me to do that without forcing off all apps in a particular db ?
If that is the case i can build some intellegence into monitoring db
activities and dynamically adjust BP according to load. Has anyone
done that ?

Selma
Blair Adamache <ba*******@2muchspam.yahoo.com> wrote in message news:<c1**********@hanover.torolab.ibm.com>...
Somebody pinged me yesterday about your question and suggested that if
the database is seldom active, but you could predict when access could
take place, you could get a table for the customer into the bufferpool
by doing some SQL that touches all rows (i.e. forces a table scan).

There are good features in v8, such as dynamically changing the sizes of
bufferpools, that would help with the problem you face.

Selma_g wrote:

Hi,

I am wondering if the bufferpools and agent memory canbe shared within
a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our
business model requires us to add about 1-2 db's per month (one db per
customer), and this consume the memory.
Some of these dbs are not highly active but once a db is activated, at
least the bufferpools are allocated along with the init_pool of
agents. Is there a way for bufferpools and agents be shared between
databases, like other RDBMS do ?

Thank you and look forward to your answers.
Selma


Nov 12 '05 #12
"Selma_g" <se*********@yahoo.com> wrote in message
news:a3**************************@posting.google.c om...
Blair and All,

Dynamically changing bufferpool sizes in V8 - that has possibility. V8
allows me to do that without forcing off all apps in a particular db ?
If that is the case i can build some intellegence into monitoring db
activities and dynamically adjust BP according to load. Has anyone
done that ?

Selma

It will be a lot easier, and the system will perform better, if you just
tell you boss that a Sybase database is the same as a DB2 schema (in one
database).
Nov 12 '05 #13
Selma_g <se*********@yahoo.com> wrote:
Still this is living dangerously
because one schema name mistake we could load $$$ into bank A when
it's intended for bank B. Or subtract $$$ when we shouldn't have, and
incur customer's retribution for lost interests$, use of fund. I think
that is a hard sell !


You can probably handle such things quite easily if you set up the proper
privileges on the table. I.e. only the user "BANKA" can modify the data in
schema BANKA and so one. Also, the same issue exists with different
databases - you connect to the wrong database and the money goes to the
wrong bank.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #14

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

Similar topics

1
by: Srijit Kumar Bhadra | last post by:
Hello, I see that it is possible to use mmapfile.pyd of win32all. The same is mentioned in http://www.python.org/windows/win32/#mmapfile. Unfortunately I could not trace any example using...
1
by: Peter Nolan | last post by:
Hi All, I have some software that currently loads database tables into sorted arrays in memory to be binary searched by processes. (Long story as to why it does this..) Each process must either...
9
by: Raziq Shekha | last post by:
Hello all, How can I tell how much memory SQL Server is using on a server. On Windows 2000, whenever I go to Task manager/processes/memory usage SQL Server seems to be showing 1,744,124K. On...
5
by: Senapathy | last post by:
Environment: WinXP, VC++ 7.1 Standard Edition ~~~~~~~~~~~ I have a set of functions that I invoke from main() function of a sample console app. These are the functions:...
1
by: Bob Alston | last post by:
Having problems sharing an Access database on a Windows 2000 PC. The other PC is windows 98 (as I recall) but NOT windows 2000! The 2nd PC has a shortcut to the MDB on the primary PC. The MDB...
3
by: sadanjan | last post by:
Hi , Appreciate if someone can clarify if database Share Memory Limit (2 GB ) in Unix 32 bit boxes is the top limit for all the databases put together in a database or is it for each of the...
3
by: tlyczko | last post by:
Hello, I've been reading about this topic, and I've gotten myself more confused, not less. We have a single-processor license SQL Server Standard 2005 (xeon 2.8 ghz) with 4 GB RAM in Windows...
7
by: brett.estabrook | last post by:
I have written a multi-threaded c# windows service in .net 1.1 (Visual Studio .net 2003). The service has several threads that poll a Sql 6.5 database on another machine. Each thread will execute a...
9
by: Peri | last post by:
Dear All, Is there a way in which 2 application can share a common memory location to access static data? Say for example I have a product master data that is available in a single place, and...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.