Qef_qep_mem

> > An application got error QE000D (QEF out of memory). In the errlog.log
> > an UL0005 (Either ULM cannot get enough memory from SCF to initialize a
> > memory pool, or the memory pool has been exhausted) occured.
> > I solved this problem by changing the "qef_qep_mem" from 2560 to 5120.
> > What exactly am I doing here and what are the consequences?
>
> I don't know *exactly* what you are doing, and the ingres manual has some
> rather non-informative gibberish in it.  Clearly you are increasing
> some kind of QEF memory allocation.  There are no ill effects to doing
> this, that I know of, other than using a bit more memory.
>
> If your platform is an Alpha (axp.osf), I suggest going higher than
> 5120, maybe up to 8000 or 9000.  I don't know if OpenIngres has the
> problem, but in 6.4 the default of 2560 turned out to be WAY too small
> for the Alpha.
>
> --
> Karl Schendel            Phone: (412) 963-8844
> Telesis Computer Corp      Fax: (412) 963-1373
> wiz@telesismfg.com
>
> NAIUA Member-At-Large    atlarge@naiua.org

Just for the record, qef_qep_mem determines the size of the memory pool from
which QEF allocates memory during the processing of a query plan. To be more
specific, since the query plan code form is essentially reentrant (allowing
a single copy of a repeat query or db procedure plan to be executed 
simultaneously by numerous sessions, for example), each execution of a plan
needs additional memory for buffers, session specific execution structures 
and other local variables. Space for sorting is allocated out of a separate
memory pool (controlled by the qef_sort_mem parameter), but essentially all 
other memory required for query plan execution is allocated from the pool 
whose size is controlled by qef_qep_mem. This memory is collectively referred 
to as the "data segment header" (as in data segment versus instruction segment,
I guess), which is probably the gibberish referred to by Karl.

The size of the pool from which this memory is allocated is determined by
multiplying  qef_qep_mem by cursor_limit (max number of open cursors per session
- default 16) by the maximum number of concurrent user threads in a server.
Unlike other memory pools in Ingres (e.g. OPF), any single session can use far
more than its share of the QEF pool. The QE000d error will only happen when 
the sum of the current active sessions has requested more memory than available
in the pool.

A significant portion of what goes into the data segment header is addresses
and structures, thus explaining the need to increase qef_qep_mem for Alpha
systems. But as Karl says, there should be little impact resulting from an 
increased value of qef_qep_mem. In fact, Ingres memory management will only
acquire the added memory if it is actually required. There ought to be an IMA 
object defining Ingres memory pools, to allow users to see how much memory is
actually used.

Doug.
Ingres Q & A
Back to William's Home Page

© William Yuan 2000

Email William