Advise on database setup
Posted in 2000
Topics: Storage & Space Management, Stored Procedures & SPL, Server Administration, Security, Permissions & Auditing, Logging & Checkpoints, Platform-Specific Issues
Hello everyone,
I'm currently playing the role of begginer DBA at my job and I need
some advise on how to optimize the layout of our Informix database.
Currently we have an Informix 7.30.UC5, running on a SUN Enterprise 450 server,
with solaris 2.6, 2 gig of physical memory and about 8 disks with the following layout:
DISK SIZE
-------------- ------
Primary disk A = 9 gigs
Primary disk B = 9 gigs
Primary disk C = 9 gigs
Primary disk D = 18 gigs
--------------- ------
Mirror disk A = 9 gigs
Mirror disk B = 9 gigs
Mirror disk C = 9 gigs
Mirror disk D = 18 gigs
My current page size is 2K:
onstat -b:
Informix Dynamic Server Version 7.30.UC5 -- On-Line -- Up 1 days 19:35:28 -- 231712 Kbytes
Buffers
address userthread flgs pagenum memaddr nslots pgflgs xflgs owner waitlist
0 modified, 0 resident, 100000 total, 131072 hash buckets, 2048 buffer size
Due to the page size the largest chunk size I can have is 2 gig. Because
of this limitation, disk partitions are laid out in the following manner:
Disk A through C:
-----------------
format:
Current partition table (original):
Total disk cylinders available: 4924 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 - 243 426.08MB (243/0/0) 872613
1 unassigned wm 244 - 1412 2.00GB (1169/0/0) 4197879
2 backup wu 0 - 4923 8.43GB (4924/0/0) 17682084
3 unassigned wm 1413 - 2581 2.00GB (1169/0/0) 4197879
4 unassigned wm 2582 - 3750 2.00GB (1169/0/0) 4197879
5 unassigned wm 3751 - 4919 2.00GB (1169/0/0) 4197879
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
Disk D
------
format:
Current partition table (original):
Total disk cylinders available: 7506 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 - 891 2.00GB (891/0/0) 4198392
1 unassigned wm 892 - 1782 2.00GB (891/0/0) 4198392
2 backup wu 0 - 7505 16.86GB (7506/0/0) 35368272
3 unassigned wm 1783 - 2673 2.00GB (891/0/0) 4198392
4 unassigned wm 2674 - 3564 2.00GB (891/0/0) 4198392
5 unassigned wm 3565 - 4455 2.00GB (891/0/0) 4198392
6 unassigned wm 4456 - 5346 2.00GB (891/0/0) 4198392
7 unassigned wm 5347 - 6237 2.00GB (891/0/0) 4198392
-------
Disk capacity: 16.86GB Disk available: 14.00GB = Wasted space-> 2.86 gigs
* QUESTION: How can I increase the pagesize for the database so I could have
a 4K pagesize, therefore allowing me to have 4 Gig chunks?
From the manual, it's system dependent but from what I can tell, my
hardware supports is able to support a larger pagesize, the command:
"/usr/bin/pagesize" displays a pagesize of 8192
The current logical layout of my database looks like this: have in mind that all
special dbspaces are located on the first slice d0s0 of each disk:
DBSPACE SIZE LOCATION
------- ---- -------
rootdbs 420megs disk A d0s0
dbs00 2gb disk A d0s1
physdbs 400megs disk B d0s0
dbs01 2gb disk B d0s1
logdbs 420megs disk C d0s0
dbs03 2gb disk C d0s1
dbs02 2gb disk D d0s0
I have a total of two databases, one that is about 30 megs and the other
one well, here it is:
Size of Table(N) = numrows * rowsize
(1) 79171321 *303 = 23,988,910,263
(2) 54173 * 78 = 4,225,494
(3) 16096*114 = 1,834,944
(4) 17291103 * 291= 5,031,710,973
(5) 55*276 = 15,180
(6) 91495086 * 30 = 2,744,852,580
(7) 104*260 = 27,040
(8) 16172214 *12 = 194,066,568
(9) 852559 * 71 = 60,531,689
(10) 854546 * 268 = 229,018,328
(11) 13440*134 = 1,800,960
----------------------------------
11 Tables = 32,256,994,019 bytes
Average Table Size = 2,932,454,001
It took about 12 months for the tables to reach this label, therefore we intake
about 90 megs a day worth of data.
I would like tables #5, #6, #9, #4 to be optimized for speed, from what I can
understand from the manual , I should be placing this tables in the middle
cilinders of the disks, and also in their own dbspaces.
MORE QUESTIONS
1- What should my extent sizes be? I read in some posting it should be 1/16 of the current size, others
1/10, what do you guys suggest? My plans are to make the first extent size the current size of the
plus 1/16 of it's current size therefore:
first extent = Currentsize + (CurrentSize/16)
next extent = 1/16
2- I'm planning to turn "Buffered Logging" this database, is my physical and logical
dbspaces large enough to handle it? (we do backups every night)
3- What's the deal with the DBSPACE, I know you use them to match the logical location of
tables to their physical location on the disk, but besides this use, what commands
the number of dbspaces?
4- How many logical logs should I have? The max amount of users we will ever have on the system
is 20, from your formula I tell that the logical logs should be:
Logical Log Size = 20 users * maxrows * 512
_ what does maxrows refer to? Is it to the maximun
numbers of rows I will insert in a single transaction?
Physlog = userthreads * max_log_pages_per_critical_section *4
Also the physical log seem to be similar to the logical log formula,
but I'm a bit shady as to what the max log pages per critical section means.
5- How big should my rootdbs be now that I moved the logical logs and physycal logs out of them?
I'm planning to create a tempdbs space only for temporary tables, should I use the rootdbs for
that? I got a feeling it's not a wise thing to do, but I'm just a begginer.
Well guys this was my little posting, hope I'm not asking for way too much out of ya,
if you can make a suggestion, I would greatly appreciate it.
Thank you for you time
Julnio Vasquez
Related threads
- onbar -c -F in Windows Informix instance
- Display Array in 4GL
- ontape -l show 100% full logs but ontape -a doesn't flush them
- Anyone... SQLCODE=-668, ISAM error=-1