473,785 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

simple sortheap question

My simple sortheap configuration question is:

the sortheap parameter specifies the amount of memory used by agents
for sorts. Is this value the total for all agents or for each?
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR ) = (SHEAPTHRES)
Sort list heap (4KB) (SORTHEAP) = 3000
SQL statement heap (4KB) (STMTHEAP) = 3000

Does this setting mean that each agent will get 12mb memory pool for
sorts, or that for this entire database there is a total of 12mb
available for private sorts by agents on this database?

Thanks in advance,
Chris

Nov 12 '05 #1
3 1945
Ian
ChrisHadley wrote:

Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR ) = (SHEAPTHRES)
Sort list heap (4KB) (SORTHEAP) = 3000
SQL statement heap (4KB) (STMTHEAP) = 3000

Does this setting mean that each agent will get 12mb memory pool for
sorts, or that for this entire database there is a total of 12mb
available for private sorts by agents on this database?


Sort heap is allocated per sort, not per connection. SORTHEAP
is a limit on the memory a single sort can allocate -- meaning
that a sort allocates what it needs, not the maximum. The total
memory for a single database is controlled by SHEAPTHRES_SHR.

See the docs for more information on these config parameters.
Google is a good place to start.
Nov 12 '05 #2
I believe you mean the db cfg parameter SHEAPTHRES. The document that
I have:

http://www-128.ibm.com/developerwork...cle/dm-0406qi/

says:

"For private sorts, the database manager configuration parameter
sheapthres specifies an instance-wide soft limit on the total amount of
memory that can be consumed by private sorts at any given time."

In any case the sortheap parameter is for each agent's private sorts.

Thanks for pointing me in the right direction.

Chris

Nov 12 '05 #3
SORTHEAP is a db cfg parm. and is assigned ON DEMAND up to 3000 pages as per
your parm values.
It is for each/any statement. It is determined at stmt. compile time as to
how big the optimizer thinks it will need. That's what it requests at
execute time.
SHEAPTHRESH is a dbm cfg parm that is instance wide. It is a soft limit
meaning that the instance will monitor all db's belonging to it that have
stmts using sortheaps. Their sum is controlled by SHEAPTHRESH in that the
instance will not allocate the requested size for new sortheaps but a bit
less so that it stays within that limit.
You can see this when you turn on the monitor switch for sorts and take
snapshots. It will tell you when you have post threshold sorts requested.

SHEAPTHRESH_SHR is a hard limit that has to be considered if you are using
multi processors and/or partioned faciltity. Then that parm. needs to be
taken into account as it requests real memory area for holding sort results
from the agents involved servicing that specific query statement.

STMTHEAP has no bearing on sorts. It is used to determine the amount of
work area the client can request when it has to compile a statement not
execute it.

HTH, Pierre

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"ChrisHadle y" <ch*********@gm ail.com> a écrit dans le message de
news:11******** **************@ l41g2000cwc.goo glegroups.com.. .
My simple sortheap configuration question is:

the sortheap parameter specifies the amount of memory used by agents
for sorts. Is this value the total for all agents or for each?
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR ) = (SHEAPTHRES)
Sort list heap (4KB) (SORTHEAP) = 3000
SQL statement heap (4KB) (STMTHEAP) = 3000

Does this setting mean that each agent will get 12mb memory pool for
sorts, or that for this entire database there is a total of 12mb
available for private sorts by agents on this database?

Thanks in advance,
Chris


Nov 12 '05 #4

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

Similar topics

1
4353
by: Li Kao | last post by:
After incrementally increasing SORTHEAP (and the commensurate increase in SHEAPTHRES) and *slightly* reducing the bufferpool size, I find that my query is no longer taking advantage of async IO for reads. I discovered this message in the db2diag.log: ==================================== PID:80850(db2agntp (LIKAO) 0) Appid:*LOCAL.db2inst1.031121211302 sort/list_services sqlsOptimizeNumMergeRuns Probe:10 Database:LIKAO
4
3008
by: Erik Hendrix | last post by:
Hi, I've got a question. We just increased our SORTHEAP from 4096 to 25600 and our SHEAPTHRESH from 80000 to 262144. Now we saw a SQL955 error occuring but no reason code attached to it. According to the help, this error occurs if there is insufficient private process memory (there are no errors in /var/adm/messages regarding running out of memory and no messages in db2diag.log). Or if there is insufficient shared memory in the...
10
2796
by: p175 | last post by:
Hi folks, I'm after some guidelines on general memory allocations for DB2 8.2.2 ESE on Win2k Server FP4 with 4gb physical memory. Seeing as everything is 32bit and win2k server does not support /3gb switch, we are restricted memory wise for allocating memory to db2syscs.exe to around 1.75gb so I understand, what are the general rules of thumb for assigning memory ?
7
2289
by: abcd | last post by:
I am trying to set up client machine and investigatging which .net components are missing to run aspx page. I have a simple aspx page which just has "hello world" printed.... When I request that page like http://machinename/dir1/hellp.aspx instead of running that page it starts downloding ...whats missing here ....why the aspx engine not running the page....
4
118818
by: dba_222 | last post by:
Dear Experts, Ok, I hate to ask such a seemingly dumb question, but I've already spent far too much time on this. More that I would care to admit. In Sql server, how do I simply change a character into a number?????? In Oracle, it is:
14
2989
by: Giancarlo Berenz | last post by:
Hi: Recently i write this code: class Simple { private: int value; public: int GiveMeARandom(void);
30
3545
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
17
5820
by: Chris M. Thomasson | last post by:
I use the following technique in all of my C++ projects; here is the example code with error checking omitted for brevity: _________________________________________________________________ /* Simple Thread Object ______________________________________________________________*/ #include <pthread.h> extern "C" void* thread_entry(void*);
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10341
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10095
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7502
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.