1 / 22

Disks and Things

2. Disks and Things. Introduction. This is a mix and match section It contains all the information that does not have a home elsewhere in this presentation It covers Disk layouts Disk Farms Striping on Striping. Disk Layouts.

rdomenico
Download Presentation

Disks and Things

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2 Disks and Things

  2. Introduction • This is a mix and match section • It contains all the information that does not have a home elsewhere in this presentation • It covers • Disk layouts • Disk Farms • Striping on Striping

  3. Disk Layouts • In IQ (Simplex or Multiplex) the disk performance is critical to the overall speed of the system • In an IQ-M system you can have a number of different disk configurations • We consider the following • Simple SCSI (or UDMA-[1]66) Disks • Basic Disk “Farms” (Collections of raw disks) • RAID Systems (NT RAID, Clariion etc.) • Disk Subsystems (EMC, HDS[SunStor].)

  4. Basic Disk Farms • Here we are considering a number of “dumb” disks • There is no intelligence in the disks – or the controllers • Here is where we use IQ-M striping • Here we have a number of disk drives (on various controllers) • We stripe across a series of disks

  5. Disk Striping Basic Disks 1-dimensional IQ Striping In the 1-dimensional striping we are spreading the data writes (and reads) across a series of disk drives – limiting the overall disk head movement.

  6. Problems with Disk Striping • IQ-M has to make location decisions as to where to write and read the data • It is not as simple as writing to “bit bucket” or a serial list of disk blocks • It is faster than simple 1 disk = 1 device • The performance hit is measured in extra micro seconds per read/write – but with a 10 TBytes database this could be important

  7. In RAID 1 – Mirror, we can consider that Disks A and B are mirrored and Disks C and D This improves read and write performance, as the controller will pick which disk heads are closer to the data required. Also there is an improvement in data security – 2 copies A D A D C B C B RAID – 0,1 Redundant Array of Inexpensive Disks Raid 1 - Mirror In RAID 0 – Stripe, we can spread the reads and writes as per the last slide Raid 0 - Stripe This dramatically improves the read and write performance, but does nothing for the data security

  8. In RAID 0/1 – Stripe and Mirror, we can see that the stripe sets on A and B mirror to C and D This gives security – in the mirroring (copies) of the data, and improved performance due both to the two copies and the stripe sets A D A D C B C B In RAID 5 – Csum/MR, The data is in “stripes” across the disks then a checksum is written to the final disk This gives a small performance improvement for reads, no improvement for writes (in fact it will slow writes down!). The only bonus is security. The system will allow a disk failure in the pack without requiring the 2 to 1 overhead of mirroring systems RAID – 0/1 and 5 Redundant Array of Inexpensive Disks Raid 0/1 – Stripe and Mirror Raid 5 – Checksum Multi-read

  9. Other RAID • There is RAID 2, 3 and 4 • These are variations on the mirroring/striping and checksum theme • There are also proprietary RAID schemes • RAID S The is EMC’s RAID system • RAID M This is the MTI RAID Scheme • We will come on to talk about proprietary schemes in a few slides time

  10. Well is RAID useful ? • Yes it is – mainly ! • If the RAID system handles the data distribution at the hardware level (with RAID controllers) then RAID is both fast and safe • Windows NT (and 2000) can drive RAID through the operating system • This can be slower than IQ-M performing the striping • Watch out for large numbers of reads – and individual read performance slowing down • RAID 5 on Disk Subsystems is a good compromise between speed and reliability

  11. Disk Subsystems (emc, HDS) • These are disk arrays where we have no idea what the internal organization of the disks is (and nor do we care) • Generally we can consider that we are writing to memory (and usually we are!) • The tuning of the disks is usually best left up to the Hardware Support guys

  12. Striping on Striping • There is one very contentious area in disk organisation • This is 2 dimensional disk striping or striping on stripes • This is driven by using an operating system or RAID unit to provide 1 dimensional striping on a series of disks • Then we apply IQ striping onto the existing striping • 2 Dimensional stripes • Do it right – it’s very fast, do it wrong and it isn’t!

  13. A diagram Operating System Striping AS IQ-M Striping The reason this works is now the individual disks only have a very small amount of data to read and write so we rely on very fast disk -> processor communications If this is done properly it is the fastest disk access for ASIQ-M

  14. Disk Striping • By default Disk_Striping is set ON for RAW devices and OFF for file system devices • We should be using RAW devices – they are (generally) a lot faster and potentially safer than file system devices • You may want to play with this parameter if you are running devices on disk farms or RAID array systems

  15. Disk Striping Packed • This was put in to the 12.4.3 release – but is little used. This option changes the number of Allocation Maps from 1 to 16 - allowing each allocation map to present space in specific unit values, such as 1 Block, 2 blocks etc.. • This allows for very slightly slower allocation of pages (minimal incremental cost), but better space utilization within the database – and in some case potentially faster allocation of space if there is a very fragmented store. • It is recommended that this is turned on at all times. • We will talk more about this during CREATE DATABASE

  16. IQ Store Dbspace Management • New functionality permits removing a dbspace from the IQ Store • without interrupting database activity • You can add a new dbspace and move data from an 'old' disk to a new device • Drop a dbspace after all objects have been relocated • New Commands and Functions: • Determine database objects on a dbspace • Set a dbspace in 'read_only' status to prevent new writes • Move objects from one dbspace to another

  17. IQ Store Dbspace Management • Dbspaces may be enlarged • For dbspaces created using 12.6, you may be able to enlarge a dbspace • In order to enlarge a dbspace you must 'reserve' space for the freelist when you create a new dbspace • Explanation follows

  18. Freelist Pages Sybase IQ Dbspace Basics • When you create a dbspace some pages are reserved for the 'freelist' • The freelist tracks pages that are available to hold data in that particular dbspace • The amount of space reserved for the freelist depends on the size of the dbspace

  19. Freelist Pages Reserved Pages Reserving Space for the Freelist • New parameter in the Create Database andCreate Dbspace commands allow for reserving space in the freelist • Command below creates a new dbspace reserving 5 MB for the freelist • Create dbspace newdbs as '/data/iqstore2' IQ STORESize 500 Reserve 5

  20. Alter Dbspace Command • With space for the freelist reserved you could increase the size of the dbspace using the Alter Dbspace command - • Alter dbspace newdbs • Size 750 MB • New Options for dbspace • READWRITE • READONLY • RELOCATE

  21. Dbspace “Commands” • sp_iqdbspaceinfo • What is located within the dbspaces • sp_dbspace • Usages and properties of the dbspace • sp_iqrelocate • Moves data between dbspaces

  22. Disk etc. - End

More Related