Posts Tagged ‘Disk’

Understanding MySQL Table Types

Tuesday, September 30th, 2008

MySQL supports various of table types or storage engines to allow you to optimize your database. The table types are available in MySQL are:

* ISAM
* MyISAM
* InnoDB
* BerkeleyDB (BDB)
* MERGE
* HEAP

The most important feature to make all the table types above distinction is transaction-safe or not. Only InnoDB and BDB tables are transaction safe and only MyISAM tables support full-text indexing and searching feature. MyISAM is also the default table type when you create table without declaring which storage engine to use. Here are some major features of each table types:
ISAM

ISAM had been deprecated and removed from version 5.x. All of it functionality entire replace by MyISAM. ISAM table has a hard size 4GB and is not portable.
MyISAM

MyISAM table type is default when you create table. MyISAM table work very fast but not transaction-safe. The size of MyISAM table depends on the operating system and the data file are portable from system to system. With MyISAM table type, you can have 64 keys per table and maximum key length of 1024 bytes.
InnoDB

Different from MyISAM table type, InnoDB table are transaction safe and supports row-level locking. Foreign keys are supported in InnoDB tables. The data file of InnoDB table can be stored in more than one file so the size of table depends on the disk space. Like the MyISAM table type, data file of InnoDB is portable from system to system. The disadvantage of InnoDB in comparison with MyISAM is it take more disk space.
BDB

BDB is similar to InnoDB in transaction safe. It supports page level locking but data file are not portable.
MERGE

Merge table type is added to treat multiple MyISAM tables as a single table so it remove the size limitation from MyISAM tables.
HEAP

Mysql-Insert delayed

Thursday, July 24th, 2008

Use insert delayed when you do not need to know when your data is written. This reduces the overall insertion impact because many rows can be written with a single disk write.

windows :Turn off the low disk space windows notification Baloon Tip

Monday, June 30th, 2008

start regedit,
add/update value “NoLowDiskSpaceChecks” to DWORD = 1
path: HKEY_CURRENT_USER -> Software -> Microsoft -> Windows -> CurrentVersion -> Policies -> Explorer
requires a logoff or reboot

How to get disk usage/space for a directory

Monday, June 30th, 2008

du -h /home/user | sort -n -r > disk_usage.log
-h - gives results in KB/ MB etc.
redirecting the output helps later inspection because if you have many folders you won’t be able to see the folders that take a lot of space.

Disk Space

Thursday, June 26th, 2008

Every hosting account has a certain allotment of disk space. The disk space is used to hold all the files which make up your web site – HTML files, graphics, scripts, and multi-media content. Usually the more expensive the hosting package the more disk space and the more bandwidth you receive.

A basic web site with just a few pages requires less than 1 MB of disk space. As you add more content and include things like downloadable files, pictures, music, and video you will require more disk space. Email also takes up disk space. If you have an account with a small disk allotment you may find that unsolicited SPAM may be eating away at your disk allotment. It’s always a good idea to go through your inbox from time to time to delete unnecessary emails.

What will happen if you use too much disk space? Each web host has their own policy about this but it’s safe to say that you will be charged for the extra space. Often this penalty is much higher than regular rates for disk space so it’s important to keep an eye on how much space you are using and if you are approaching the limit, either purchase more space or delete some files.

How can you tell how much space you are using? Most hosting packages have a control panel for making adjustments to almost every aspect of your account. These control panels usually tell you how much disk space is being used and may also rate it against your allotment so you can see at a glance if you are approaching your limit. If your hosting account does not have this feature you can judge the amount of space by downloading your entire site to a folder on your personal computer in order to check how much space it takes.

As a rough guide, consider that an average web page (3 graphics and 2 screen lengths of text) takes about 20 kb (to be generous). At this rate, a hosting package with 10 MB can have about 500 pages. Since most small sites are less than 50 pages 10 MB should be plenty to get started. But what about databases? They are usually calculated separately from your disk allotment but check with your web host to see what their policy is.

If you place music or video files on your website your need for disk space (and bandwidth) starts to take off. A typical 3 minute MP3 file takes about 2.5 to 3 MB of disk space. A short video (very poor quality) can take 1 MB. A good rule of thumb for those wishing to host multimedia is to estimate the total size of the files and get an account with double that space. This will allow for future expansion. Always check with your web host, though, before placing sound or video files on your website. Some have policies against this type of content because it places a strain on the bandwidth allotment – a serious consideration with a shared hosting package.