Wednesday 30 December 2009

Understanding Sybase Page Architecture

1. The databases storage are divided into allocation units. Allocation units are storages comprising of 256 data pages. Thus meaning that there will be one row of one extent ( 8 pages / row ). Thus giving us a total of 32 rows in an allocation unit. Each row has 8 pages or 1 extent. An object has minimum space allocated as one extent

2. The first page of each allocation unit ( 0, 256 …numbers ) are the allocation pages for the allocation unit which contain information of the objects and respective pages allocated to the objects which are having pages allocated in that allocation unit.

3. The GAM is the global allocation map page which is containing bitmap of the allocation units per database. If an allocation unit is having no free extent then it will show bitmap value 1.

4. The OAM is the object allocation map page which is the first page of the allocated pages for an object and this page basically points to the allocation pages which contain the objects page allocation information. Thus this basically points to the allocation unit's allocation page which has its information about page alllocation.

Thus to conclude 1 allocation unit - 32 rows --8 pages per row -- 1 extent per row. Page(0), Page(256) , Page (512) are the allocation pages. These are referenced by OAM pages of the objects which actually have pages in the allocation units.

Suppose an object is stored in 3 extents. 2 extents in allocation unit 1 and 1 extent in allocation unit 2. Then Allocation page of AU1 and AU2 will contain information of the object id and the extents occupied in the respective allocation units. Thus the OAM of the object will be making references to allocation page of AU1 and AU2.

1 comment: