Problem with extents on big table
Posted in 2008
A user on Solaris with IDS 9.40 put one huge table in a single 2K-page dbspace and hit "no more extents" even though the dbspace had plenty of free space. Replies explained the cause: a single table partition/fragment is capped at about 16.7 million pages (~32GB at 2K pages), not 4TB. The fix is to split the disk into several chunks/dbspaces and fragment the table across them (round-robin or expression-based), since 9.40 can't put multiple fragments in one dbspace and has a fixed 2K page size. Suggested migration: rename the old table, create the fragmented one, then INSERT INTO ... SELECT and drop the old table/dbspace.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management, Platform-Specific Issues, Versions, Editions & End-of-Life
Hi guys,
anyone can help me on this ?
Platform : Solaris 9 with IDS 9.40 FC7
A dbspace "bdoc" has been created.
Onstat -d indicates a size of 400 000 000 2K pages,
of which still 382 122 223 2K pages free.
A table document has been created
"in bdoc extent size 32000000 next size 32000000 lock mode page ;"
create unique index document1 on document (numdoc) using btree ;
In sysextents we see a first size of 16000000 and the next is only 777215
Millions of records have been inserted but now the application gets
an error : no more extents.
I thought the limit was 4Tb in 9.40 ??
What am I missing here ?
Thanks for any reply
Jacques Lapeire
It can't assign the extent because your hitting the following limit detailed in the release notes... Data pages per fragment 16,775,134 On IDS 9.4 with a 2k page size your limited to 32GB of a table per DBSpace. You'll need to implement an Informix fragmentation strategy using multiple DBSpaces for this table before you can grow it beyond 32GB.
JACQUES LAPEIRE wrote:
> Hi guys,
>
> anyone can help me on this ?
>
> Platform : Solaris 9 with IDS 9.40 FC7
>
> A dbspace "bdoc" has been created.
> Onstat -d indicates a size of 400 000 000 2K pages,
> of which still 382 122 223 2K pages free.
>
> A table document has been created
> "in bdoc extent size 32000000 next size 32000000 lock mode page ;"
> create unique index document1 on document (numdoc) using btree ;>
> In sysextents we see a first size of 16000000 and the next is only 777215
>
Jacques,
The largest single partition (or fragment) permitted in an IDS table is
16,777,215 pages! You cannot get more than that in a single partition.
You will have to fragment your table into multiple fragments in order to
have a table larger than 16,777,215 pages. In IDS 9.40 each of those
fragments will need to be created in a different dbspace (in IDS 10.00
and later you can create multiple fragments in a single dbspace). If
you've created your one huge dbspace with all of your assigned disk
space, you will have to drop the database and the dbspace and reorganize
the space into several dbspaces then recreate this huge table fragmented
across several of those dbspaces.
Art S. Kagel
Oninit
> Millions of records have been inserted but now the application gets
> an error : no more extents.
>
> I thought the limit was 4Tb in 9.40 ??
>
> What am I missing here ?
>
> Thanks for any reply
>
> Jacques Lapeire
>
================================================================================
===========
Please access the attached hyperlink for an important electronic
communications disclaimer:
http://www.oninit.com/home/disclaimer.php
================================================================================
===========
Thanks for the replies,
In fact this dbspace consist of only 1 chunk and is meant only for this
table.
So I suppose I don't have to drop the complete database ? But only this
dbspace ??
Furtheron , I've never used fragmentation, can anyone explain in short
the necessary steps ?
Jacques
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Art S. Kagel (Oninit)
Sent: donderdag 6 maart 2008 17:29
To: ids@iiug.org
Subject: Re: Problem with extents on big table [11521]
JACQUES LAPEIRE wrote:
> Hi guys,
>
> anyone can help me on this ?
>
> Platform : Solaris 9 with IDS 9.40 FC7
>
> A dbspace "bdoc" has been created.
> Onstat -d indicates a size of 400 000 000 2K pages,
> of which still 382 122 223 2K pages free.
>
> A table document has been created
> "in bdoc extent size 32000000 next size 32000000 lock mode page ;"
> create unique index document1 on document (numdoc) using btree ;>
> In sysextents we see a first size of 16000000 and the next is only
777215
>
Jacques,
The largest single partition (or fragment) permitted in an IDS table is
16,777,215 pages! You cannot get more than that in a single partition.
You will have to fragment your table into multiple fragments in order to
have a table larger than 16,777,215 pages. In IDS 9.40 each of those
fragments will need to be created in a different dbspace (in IDS 10.00
and later you can create multiple fragments in a single dbspace). If
you've created your one huge dbspace with all of your assigned disk
space, you will have to drop the database and the dbspace and reorganize
the space into several dbspaces then recreate this huge table fragmented
across several of those dbspaces.
Art S. Kagel
Oninit
> Millions of records have been inserted but now the application gets
> an error : no more extents.
>
> I thought the limit was 4Tb in 9.40 ??
>
> What am I missing here ?
>
> Thanks for any reply
>
> Jacques Lapeire
>
========================================================================
===================
Please access the attached hyperlink for an important electronic
communications disclaimer:
http://www.oninit.com/home/disclaimer.php
========================================================================
===================
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!
Another option: cheat. Create a dbspace with 8k page size (or whatever might work for you). NOT an ideal solution though. Fragmentation is the better answer for large tables. I believe IDS 10 allows multiple fragments in the same dbspace if necessary. Bob Roussey Unix / Informix Administration Spirit Airlines Robert.Roussey@SpiritAir.com -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of DAVE GRIFFEN Sent: Thursday, March 06, 2008 11:24 AM To: ids@iiug.org Subject: Re: Problem with extents on big table [11520] It can't assign the extent because your hitting the following limit detailed in the release notes... Data pages per fragment 16,775,134 On IDS 9.4 with a 2k page size your limited to 32GB of a table per DBSpace. You'll need to implement an Informix fragmentation strategy using multiple DBSpaces for this table before you can grow it beyond 32GB. ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. See you at the IIUG Informix 2008 Conference The Power Conference for Informix Professionals April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas http://www.iiug.org/conf Registration Now Open!!
Robert Roussey(IT) wrote: > Another option: cheat. Create a dbspace with 8k page size (or > whatever might work for you). > Fixed pagesizing in 9.40! Jacque is limited to the system page size of 2K unless he upgrades to 10.00 or 11.10. Art S. Kagel Oninit > NOT an ideal solution though. Fragmentation is the better answer for > large tables. I believe IDS 10 allows multiple fragments in the same > dbspace if necessary. > > Bob Roussey > Unix / Informix Administration > Spirit Airlines > Robert.Roussey@SpiritAir.com > > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of > DAVE GRIFFEN > Sent: Thursday, March 06, 2008 11:24 AM > To: ids@iiug.org > Subject: Re: Problem with extents on big table [11520] > > It can't assign the extent because your hitting the following limit > detailed > in the release notes... > Data pages per fragment 16,775,134 > > On IDS 9.4 with a 2k page size your limited to 32GB of a table per > DBSpace. > You'll need to implement an Informix fragmentation strategy using > multiple > DBSpaces for this table before you can grow it beyond 32GB. > > > ================================================================================ =========== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.oninit.com/home/disclaimer.php ================================================================================ ===========
Lapeire, Jacques wrote:
> Thanks for the replies,
>
> In fact this dbspace consist of only 1 chunk and is meant only for this
> table.
>
Yes, if this table is the only one in the dbspace, then you can drop the
table (presumably you can recreate the data or you will export it
first), recreate the space by braking the disk into multiple chunks
(either by partitioning it or using offsets - separate partitions are
VERY MUCH preferred for maintenance reasons that will bite you one day
if you use offsets) and creating several dbspaces using those chunks.
Once that's done you can:
CREATE TABLE my_huge_table (...
) FRAGMENT IN
<fragmentation expression>
...;
Fragmentation expressions are explained in the Guide to SQL Syntax. You
have two basic choices:
ROUND ROBIN fragmentation where the data is distributed roughly evenly
across <N> dbspaces/fragments or a calculated fragmentation expression.
The calculation can be as simple as:
all values of column colA < value1 in dbspace1, values between value1+1
and value2 in dbspace2 etc.
or complex like a hash:
all values of column colB where colB/7 = 1 in dbspace1, colB/7 = 2 in
dbspace2, ... colB/7 = 0 in dbspace7
or using a function:
all values of datecol where MONTH(datecol) = 1 in dbspace1, ...
Art S. Kagel
Oninit
> So I suppose I don't have to drop the complete database ? But only this
> dbspace ??
>
> Furtheron , I've never used fragmentation, can anyone explain in short
> the necessary steps ?
>
> Jacques
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> Art S. Kagel (Oninit)
> Sent: donderdag 6 maart 2008 17:29
> To: ids@iiug.org
> Subject: Re: Problem with extents on big table [11521]
>
> JACQUES LAPEIRE wrote:
>
>> Hi guys,
>>
>> anyone can help me on this ?
>>
>> Platform : Solaris 9 with IDS 9.40 FC7
>>
>> A dbspace "bdoc" has been created.
>> Onstat -d indicates a size of 400 000 000 2K pages,
>> of which still 382 122 223 2K pages free.
>>
>> A table document has been created
>> "in bdoc extent size 32000000 next size 32000000 lock mode page ;"
>> create unique index document1 on document (numdoc) using btree ;>>
>> In sysextents we see a first size of 16000000 and the next is only
>>
> 777215
>
>
> Jacques,
>
> The largest single partition (or fragment) permitted in an IDS table is
> 16,777,215 pages! You cannot get more than that in a single partition.
> You will have to fragment your table into multiple fragments in order to
>
> have a table larger than 16,777,215 pages. In IDS 9.40 each of those
> fragments will need to be created in a different dbspace (in IDS 10.00
> and later you can create multiple fragments in a single dbspace). If
> you've created your one huge dbspace with all of your assigned disk
> space, you will have to drop the database and the dbspace and reorganize
>
> the space into several dbspaces then recreate this huge table fragmented
>
> across several of those dbspaces.
>
> Art S. Kagel
> Oninit
>
>
>> Millions of records have been inserted but now the application gets
>> an error : no more extents.
>>
>> I thought the limit was 4Tb in 9.40 ??
>>
>> What am I missing here ?
>>
>> Thanks for any reply
>>
>> Jacques Lapeire
>>
>>
================================================================================
===========
Please access the attached hyperlink for an important electronic
communications disclaimer:
http://www.oninit.com/home/disclaimer.php
================================================================================
===========
If you have the space, Jacques, leave the table where it is and rename it.
Create your new dbspaces, then perform the "create table".
You might want to look into the use of RAW and STANDARD tables ... might
save some hassles with the data movement.
Now all you have to do is "insert into newtable select * from oldtable".
When the data has all been copied to the new table and its new dbspaces, you
can then drop the old table and dbspace.
Unloading the table ... well, worries about disk space, etc., etc.
Take care.
Clifton M. Bean
Informix DBA / AIX System Admin
Currency Technics & Metrics
Phone: (972) 812-1411 x244
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Art S.
Kagel (Oninit)
Sent: Thursday, March 06, 2008 11:25 AM
To: ids@iiug.org
Subject: Re: Problem with extents on big table [11525]
Lapeire, Jacques wrote:
> Thanks for the replies,
>
> In fact this dbspace consist of only 1 chunk and is meant only for this
> table.
>
Yes, if this table is the only one in the dbspace, then you can drop the
table (presumably you can recreate the data or you will export it
first), recreate the space by braking the disk into multiple chunks
(either by partitioning it or using offsets - separate partitions are
VERY MUCH preferred for maintenance reasons that will bite you one day
if you use offsets) and creating several dbspaces using those chunks.
Once that's done you can:
CREATE TABLE my_huge_table (....
) FRAGMENT IN
<fragmentation expression>
....;
Fragmentation expressions are explained in the Guide to SQL Syntax. You
have two basic choices:
ROUND ROBIN fragmentation where the data is distributed roughly evenly
across <N> dbspaces/fragments or a calculated fragmentation expression.
The calculation can be as simple as:
all values of column colA < value1 in dbspace1, values between value1+1
and value2 in dbspace2 etc.
or complex like a hash:
all values of column colB where colB/7 = 1 in dbspace1, colB/7 = 2 in
dbspace2, ... colB/7 = 0 in dbspace7
or using a function:
all values of datecol where MONTH(datecol) = 1 in dbspace1, ...
Art S. Kagel
Oninit
> So I suppose I don't have to drop the complete database ? But only this
> dbspace ??
>
> Furtheron , I've never used fragmentation, can anyone explain in short
> the necessary steps ?
>
> Jacques
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> Art S. Kagel (Oninit)
> Sent: donderdag 6 maart 2008 17:29
> To: ids@iiug.org
> Subject: Re: Problem with extents on big table [11521]
>
> JACQUES LAPEIRE wrote:
>
>> Hi guys,
>>
>> anyone can help me on this ?
>>
>> Platform : Solaris 9 with IDS 9.40 FC7
>>
>> A dbspace "bdoc" has been created.
>> Onstat -d indicates a size of 400 000 000 2K pages,
>> of which still 382 122 223 2K pages free.
>>
>> A table document has been created
>> "in bdoc extent size 32000000 next size 32000000 lock mode page ;"
>> create unique index document1 on document (numdoc) using btree ;>>
>> In sysextents we see a first size of 16000000 and the next is only
>>
> 777215
>
>
> Jacques,
>
> The largest single partition (or fragment) permitted in an IDS table is
> 16,777,215 pages! You cannot get more than that in a single partition.
> You will have to fragment your table into multiple fragments in order to
>
> have a table larger than 16,777,215 pages. In IDS 9.40 each of those
> fragments will need to be created in a different dbspace (in IDS 10.00
> and later you can create multiple fragments in a single dbspace). If
> you've created your one huge dbspace with all of your assigned disk
> space, you will have to drop the database and the dbspace and reorganize
>
> the space into several dbspaces then recreate this huge table fragmented
>
> across several of those dbspaces.
>
> Art S. Kagel
> Oninit
>
>
>> Millions of records have been inserted but now the application gets
>> an error : no more extents.
>>
>> I thought the limit was 4Tb in 9.40 ??
>>
>> What am I missing here ?
>>
>> Thanks for any reply
>>
>> Jacques Lapeire
>>
>>
============================================================================
===============
Please access the attached hyperlink for an important electronic
communications disclaimer:
http://www.oninit.com/home/disclaimer.php
============================================================================
===============
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!