Showing posts with label engine. Show all posts
Showing posts with label engine. Show all posts

Thursday, March 13, 2014

Bringing Debian to Google Compute Engine


This was an exciting week for the Debian community who released Debian 7.0 “wheezy” that brings big improvements including hardened security, improved 32/64-bit compatibility and addresses a lot of community feedback. Today we’re adding Debian images for Google Compute Engine. Debian, in collaboration with us, is providing images for both Debian 7.0 “wheezy” and the previous stable release, Debian 6.0 “squeeze.” This support will make it easy for anyone using Debian today to migrate their workloads onto Compute Engine.



For fast performance and to reduce bandwidth costs, Google is hosting a Debian package mirror for use by Google Compute Engine Debian instances. We’ve updated our docs and will support Debian via our usual support options or you can also check out what Debian offers.



We are continually evaluating other operating systems that we can enable with Compute Engine. However, going forward, Debian will be the default image type for Compute Engine. We look forward to hearing your feedback.



-Posted by Jimmy Kaplowitz, Site Reliability Engineer and Debian developer

Read More..

Scalr and Google Compute Engine

Todays guest post is from Sebastian Stadil, CEO of Scalr. The company providies a web-based control panel for cloud infrastructure that serves as an interface between end users and the multiple cloud platforms that they use. In this post, Sebastian discusses benchmarks they conducted to analyze Compute Engine performance.



At Scalr, we build a web-based control panel for cloud infrastructure, which serves as an interface between end users and the multiple cloud platforms that they use. Engineers use Scalr to achieve significant productivity gains, and IT departments use it to drive and control cloud adoption.



One of our customers — grandcentrix — used Scalr with Google Compute Engine a few months back. They were building the backend of the companion mobile application for the Eurovision song contest using both Compute Engine and Scalr. Our experience was documented on the Google Cloud Platform blog.



No random hiccups with Google. Only high and stable performance.

In a few words: this was the first time Eurovison had a companion app, so they had no idea how much traffic they’d have. Fortunately, our load tests had shown that Compute Engine was a predictable high performer with fast provisioning times, so all we had to do was ensure that the application architecture would scale horizontally.



Eurovision was a success, and we’re looking forward to taking on such a challenge again. Why? Because we feel very comfortable using Google Compute Engine. It just doesn’t surprise you, and delivers extremely consistent performance.



We’ve recently conducted performance benchmarks on persistent volumes across multiple cloud providers. For volumes, performance is only part of the story. Stability matters a lot, too. What good is a high performing volume if it fails to perform 1/10th of the time? Not much!



Using Google Compute Engine, every single volume performs the same, every hour of every day. If their throughput is sufficient when you run your tests, you can know for sure that Google volumes won’t let you down when you need them.



By the numbers: the benchmarks

Below, you’ll find graphs that compare the performance dispersion for IOPS, bandwidth, and latency for Google Compute Engine and EC2 volumes. This is basically a measurement of how consistent disk performance has been over hundreds of 10-minute disk-performance measurements.



What you’ll see is that Google volumes offer significantly more consistent performance than their AWS counterparts, including PIOPs volumes!



Here are the graphs. Lower dispersion means more consistent performance.


Note: we’re still in the process of adding benchmarks on sequential workloads for PIOPs volumes, but they have been benchmarked for random workloads.



Are you trying out Google Compute Engine?

Google Compute Engine, EC2, and Rackspace aren’t API-compatible, so if you intend to start using Google’s Cloud for your business today, you’ll probably need to rewrite quite a few integrations.



If that’s the case, you might want to look at the Scalr Cloud Management Platform. Using Scalr lets you design infrastructure and policies once, and use them with any cloud platform.



We actually used Scalr to run the benchmarks we presented here. If you’re interested, you could watch this talk from the OpenStack Summit, where we presented how we did it.



You can of course learn more about Scalr on our website, or request a POC.



-Contributed by Sebastian Stadil, CEO and Founder at Scalr
Read More..

Google Code Jam up and running on App Engine

Google Code Jam is a coding competition in which professional and student programmers are asked to solve complex algorithmic challenges in a limited amount of time. The contest is all-inclusive: Google Code Jam lets you program in the coding language and development environment of your choice. The Top 500 participants will advance to onsite competitions at a local Google office to compete against those in their region (Asia Pacific; Europe, Middle East and Africa; and the Americas). The Top 100 will participate in the final round at the Google Headquarters in Mountain View, California.


The application that runs the competition is built on App Engine. It was developed by a few Google engineers in their 20% time and is currently serving about 200 requests per second.


If you are interested in participating you still have a few hours to register. Go to the Code Jam site and check out the live scoreboard!


Read More..

Saturday, March 8, 2014

Compute Engine Persistent Disk Backups using Snapshots

Persistent Disks in Google Compute Engine allow you to take point-in-time snapshots of your disks. Once a snapshot is taken, it’s globally available and can be restored to any zone, even if the zone where the disk was originated is hit by a meteor. On top of that, it’s easy to create and manage snapshots. These two features make snapshots very appealing as a backup solution. However, there are some details you need to take into account in order to use snapshots safely for backup.



First, let’s take a peek on how snapshots work. A snapshot is an exact copy of your disk at a point in time. A snapshot can be taken at the same time reads and writes are happening to the disk. In physical terms, it’s like stopping the disk head while the disk is in use and copying all disk sectors out, except that, thanks to Persistent Disk design, it takes only a fraction of a second to create the snapshot. The rest of the time is spent uploading the bits to Google Cloud Storage and there is no performance impact to your disks.



Snapshots are guaranteed to be consistent at the block level (block size=4KiB). This means that snapshots never contain a partially written block (no torn writes). However, if application is making a write operation that spans multiple blocks, it’s possible that only the first portion of the write operation is stored in the snapshot. In addition, writes made to the file system cache will not be present in the snapshot, meaning a snapshot is equivalent to a disk that underwent an unclean shutdown. While most file systems and server applications can handle this just fine (due to journaled file systems, redo logs, etc.), it may require time-consuming steps to restore the disk back to a consistent state. Certain applications may not be able to handle this situation gracefully.



There are a few simple steps you can take to ensure your snapshot is consistent. First, we strongly recommend using mounted volumes for application data (not boot disk). Among other things, it’s easier and safer to take snapshots in a running instance. These are the steps you need to follow before snapshots are taken:

  1. Pause IOs coming from the application if possible. Certain applications have explicit commands to pause and resume IOs, e.g. Oracle, MySQL. If your application doesn’t support pause/resume, make sure that your application can survive unclean shutdowns (e.g. MongoDB).

  2. Flush the file system cache (sync), and

  3. Pause IOs coming from file system. You can use fsfreeze command for Ext3/4, ReiserFS, JFS, and XFS.

Once there are no more IOs being sent to disk, it’s safe to start the snapshot. Note that IOs need to be paused for just the fraction of second that it takes to create the snapshot. IO operations can then be resumed while snapshot data is copied to Cloud Storage in the background.



Here is an example where we snapshot the disk “my-disk” using gcutil tool:

> # freeze IOs in application
> sudo sync
> sudo fsfreeze -f /mnt/my-disk
> gcutil addsnapshot --source_disk=my-disk my-snapshot --nosynchronous_mode


After issuing those commands, we wait until the snapshot operation transitions to either UPLOADING or READY state:

> gcutil getsnapshot my-snapshot
+----------------------+-------------------------------+
| name | my-snapshot |
| description | |
| creation-time | 2013-09-30T19:34:24.354-07:00 |
| status | UPLOADING |
| disk-size-gb | 10 |
| storage-bytes | 3802018 |
| storage-bytes-status | UP_TO_DATE |
| source-disk | disks/my-disk |
+----------------------+-------------------------------+


We can now safely resume IOs to the disk while the upload process completes in the background:

> sudo fsfreeze -u /mnt/my-disk
> # resume IOs in application


To restore the snapshot, wait until snapshot operation completes, and execute:

> gcutil adddisk --source_snapshot=my-snapshot my-disk-copy


Mount your disk and verify that it is working as expected. I can’t stress enough how important it is to test your backups regularly and to ensure your backup procedure is correct.



Once your application data is successfully backed up, you may still want to backup the root volume to save machine configuration and tools that you have installed. It’s not safe to use fsfreeze against your root volume because any command that requires write access to disk will be blocked. For example, logging on to a machine requires write access to disk, therefore you might get locked out if your ssh session disconnects while root is frozen. The safest way to snapshot root volume is to shut down your instance and then take the snapshot. If that is not possible, reduce the number of writes to root as much as possible to reduce recovery time, and take the snapshot. Your journaled file system will be able to recover safely after your disk is restored.



-Posted by Fabricio Voznika, Software Engineer
Read More..