One of the main benefits of Cloud Computing is cost savings. With a credit card and less than a dollar an hour, you can provision compute resources within minutes. But once inside the Cloud microcosm, there are even more ways to save money. Here are some of the best practices for saving money with DB2 on the Cloud:
1) DB2 Express-C
This is DB2, the real product, for free (as in beer). DB2 Express-C has the same code base that is used in enterprises world-wide. You can get DB2 Express-C on Cloud providers such as Amazon or IBM or you can download it directly from here.
DB2 9.7 Workgroup Edition is also available on the cloud (e.g., this Amazon AMI).
2) Move test and development to the cloud
Test and Development are perfectly suited for Cloud Computing. The environments are often highly virtualized already, more portable than production environments and are needed only periodically.This is a great way to get started on the cloud quickly and with immediate benefits.
Note: If you have questions about moving your DB2 test and development environment to the cloud, feel free to email us at db2cloud< at >ca.ibm.com.
3) Compress data before storing or transferring into the cloud
This is an obvious one but still worth calling out. There is a charge for transferring data into or out of a cloud as well as storage costs for any storage as a service. With compression, you can save a good percentage of your money. Here are some compression ratios for a tar'ed up directory of executables:
7zip came out ahead at roughly 18% of the original size. That's pretty good. Even at 20%, it would save 80% of the transfer costs and/or storage costs.
4) DB2's Deep Compression
DB2's Deep Compression beats out the competition and routinely saves in the order of 40-70% of the total space usage. That's very good savings for the cloud given that storage costs money. There is a good paper on Deep Compression that has more information.
5) Compressed DB2 backups
Similarly, DB2 also supports compressed backups. If you backup data to the cloud or a storage service, you will be paying by space usage. DB2 compressed backups are simple to use and will save money in storage costs. Here is a quick example of how to use it:
db2 backup db sample to ~/backup/ COMPRESS
For more information on the backup command, see this link.
6) WLM: Workload Management
7) Reducing your cost-per-IO charges for persistent storage
When using file systems like Amazon's EBS, there is a cost per per I/O. For EBS, the cost is $0.10 per million I/Os. A million might seem like a lot but in theory, this could add up. Here are 3 methods to use to reduce cost-per-IO charges:
- Provision a VM (Virtual Machine) with a large amount of memory and create a large bufferpool.
- Use DB2 Deep Compression to reduce the amount of I/O
- I've also heard that using larger page sizes on EBS will reduce costs. (can anyone confirm?)
8) Follow the DB2 best practices for Cost Reduction
There is a new Best Practice paper for DB2 cost reduction. These best practices are not specific to the cloud but will certainly benefit cloud environments. This paper includes best practices for easy and effective configuration (making the most of the cloud environment) and DB2's well known autonomics. Let DB2 manage itself and spend your time on other things that matter.9) Take lessons from data center economics
Running a data center is a lot like being a landlord. An experienced landlord will buy top quality light bulbs, despite their expense, for all his/her properties. The expensive light bulbs last longer and will reduce the number of expensive vists per year simply to change a light bulb. Saving a few dollars on a light bulb doesn't make sense if you have to pay someone to replace it twice a year.
Data centers work on a similar principle: spend time/money on the right things to save costs. Tenants can learn a lot from the economics of the cloud data centers that they are using. As a start, try hard to avoid anything that will take a lot of human time. Human time is the one thing that doesn't scale on the cloud:
- Automate it
- Script it
- Set it up right
10) Shut it down
If you are only doing development during the day, why not terminate the VM instance(s) every night? Assuming the development window during the day is 8-10 hours, there is no need to keep the VM instance running at night. In fact, you can save up to 50% or more of your cloud usage fees by running only during the day. Similarly, test environments can be provisioned on demand when testing is needed and shutdown immediately after. If you leave the VM running when you are not using it, the data center will happily use the CPU and memory resources that you are paying for, for that of another tenant.
There are a number of ways to make this quick and painless. Some examples that may work for you:
- Keep your development/test environment in a revision control system (such as Subversion), data in a storage service (such as S3) and extract them as needed to quickly re-setup your development/test environment.
- Create your own base virtual machine images. If you find yourself spending time going through needless steps every time you provision a VM instance, create your own that has the required set up already done. You can include your favourite development environment, test environment, or whatever makes sense.
- Have your images built with a cron tab entry or other mechanism to email you if they sit idle for more than a couple of hours. I bet there is a lot of money being made from forgotten VMs over the weekend. Don't let that be your money.
There you have it... 10 practical ways to save money when using DB2 in the Cloud. With 50% or more on VM usage costs, 50% or more on storage and transfer costs, this makes it even easier to get started with DB2 on the cloud.
If you need help or have questions, let us know at db2cloud< at >ca.ibm.com.