Learning Library

← Back to Library

Performance Testing Cloud Database Migration

Key Points

  • The team pursued cloud migration primarily for disaster‑recovery and scalability benefits, but needed solid evidence that performance would actually improve.
  • To avoid a costly “lift‑and‑shift” trial, they built a parallel cloud test environment by copying a representative subset of tables and populating them with synthetic data, enabling side‑by‑side query benchmarking.
  • After evaluating many possibilities, they settled on five core metrics—CPU usage, memory usage, disk I/O, latency, and lock‑wait time—as the minimal set needed to assess database performance objectively.
  • They developed a stress‑test suite containing thousands of CRUD queries and integrated it with a concurrent monitoring system, allowing automated collection and clear presentation of the performance data while handling typical issues like SQL errors and metric synchronization.

Full Transcript

# Performance Testing Cloud Database Migration **Source:** [https://www.youtube.com/watch?v=kNl4riqEt-E](https://www.youtube.com/watch?v=kNl4riqEt-E) **Duration:** 00:05:17 ## Summary - The team pursued cloud migration primarily for disaster‑recovery and scalability benefits, but needed solid evidence that performance would actually improve. - To avoid a costly “lift‑and‑shift” trial, they built a parallel cloud test environment by copying a representative subset of tables and populating them with synthetic data, enabling side‑by‑side query benchmarking. - After evaluating many possibilities, they settled on five core metrics—CPU usage, memory usage, disk I/O, latency, and lock‑wait time—as the minimal set needed to assess database performance objectively. - They developed a stress‑test suite containing thousands of CRUD queries and integrated it with a concurrent monitoring system, allowing automated collection and clear presentation of the performance data while handling typical issues like SQL errors and metric synchronization. ## Sections - [00:00:00](https://www.youtube.com/watch?v=kNl4riqEt-E&t=0s) **Challenges of Large Database Cloud Migration** - The speaker shares an experience report on migrating a ~1 TB on‑premise database to the cloud, detailing testing approaches, performance metrics, and how to present the results for future teams. - [00:03:05](https://www.youtube.com/watch?v=kNl4riqEt-E&t=185s) **Overcoming Cloud Migration Hurdles** - A junior developer describes troubleshooting SQL errors and log overwrites during performance testing, building Python scripts for reporting, and emphasizes the importance of clear communication and extra planning time for successful large‑scale cloud migrations. ## Full Transcript
0:00So we've all heard of the cloud 0:02and have at least heard of cloud migration. 0:04But what's really involved? 0:06I'm currently on a team that is response for responsible 0:10for transferring an on-premise database to the cloud. 0:13And this on-prem database is nearly a terabyte in total size. 0:18And so this video is an experience report on some of the problems and solutions I've faced. 0:23And then some general advice I'd give for teams in the future. 0:26And this experience I'm going to talk about is really a small timeline 0:30compared to the overall grand scheme of things with the entire project. 0:33But before we dive into that, let's first answer "Why?" 0:37Why the cloud? 0:39Well, one cloud is cool and IBM's going all-in on cloud technology. 0:44But more specifically, we really like cloud for its disaster recovery 0:49and for its scalability features. 0:52And so this brings us to today's presentation. 0:55For this experience, 0:56I was on a team responsible for performance testing each kind of database 1:00to make sure scientifically that switching to the cloud is actually better for our team and for our product. 1:07And so there's three major problems that we had to work through. 1:10First, how are we going to test the cloud? 1:14Next, what kind of metrics help us prove performance quality? 1:20And third, how do we get these metrics results 1:22and present them properly? 1:26So first, testing. 1:28How do we test the cloud? 1:29Well, my team set up a cloud environment 1:32and we created a test instance of the database 1:34by copying over a big chunk of the tables 1:37and filling those tables with auto-generated data. 1:40This way, we don't have to lift and shift the entire database to the cloud, 1:45realize it doesn't work when we are testing it, 1:47and then now we're all sad because of all that wasted effort. 1:51This way we have two instances of the database in both environments 1:55and we can send queries to both of them 1:57and then emulate the performance that we're going to get when we eventually do switch over 2:02the database to the cloud. 2:03So we have our testing set up. 2:05Now, metrics. 2:07What kind of metrics help us prove performance quality? 2:10Well, after a good amount of discussion, 2:12my team narrowed it down to five major things: 2:14CPU usage, memory usage, disk IO, latency and lock waits. 2:19This will give us a good overall foundation 2:22and enough information to make a rational decision about the move. 2:26Next, results. 2:28How do we get these metrics results and present them properly? 2:31Well, this problem out of the three was the most intensive 2:35and my work specifically dealt with creating the test suite that would be used to stress the databases. 2:41The test suite I created had thousands of queries 2:43and each of the four different CRUD operations, 2:47and then the rest of my team set up a monitoring system 2:49and a metrics query to run in parallel with the CRUD operations. 2:54So, while the CRUD operations are stressing the databases, 2:57we're getting all of the metrics that we need. 3:00Setting this test suite up gave us a lot of fun problems we had to deal with. 3:05Everything from those pesky SQL errors that give you no explanation on what's wrong or how to fix them 3:11to realizing that our log files were overwriting themselves mid-test. 3:17Luckily, my team is filled with a bunch of rock stars, so we powered through and figured it out. 3:22Once we finished our performance testing and gathered the metrics, 3:26we created a series of Python scripts to parse through the information, 3:30compile the outputs and generate visualizations. 3:34This way it was really easy for our management and execs to read. 3:37And lo and behold, the cloud was faster. 3:40And a lot faster. 3:42Especially with the CPU, memory, and disk IO, 3:46it blew on-prem out of the water. 3:49Now, I know cloud migration is a very lucrative process with a lot of moving parts, 3:54and so some general advice I'd give for the teams in the future 3:57are to communicate thoroughly. 4:00And to plan extra time. 4:04Starting off with communication. 4:06Now as a junior Dev, 4:08this is the first time I've done anything sort of cloud migration related, 4:13let alone something to this scale. 4:15So there's a lot of times I felt like I didn't really see the big picture and I kind of felt out of the loop. 4:19And so I had to meet with my leads and the rest of my team a lot just to talk about 4:23the work we've completed and the work we still need to do and where we're going. 4:27So for teams in the future, 4:29I highly recommend that you be consistent in making sure that everyone's on the same page, 4:33even if it may seem a little redundant. 4:35Next, always plan extra time. 4:38There's always going to be those fun problems that come up that you just can't plan for. 4:42And so especially if you're committing to a specific deadline, 4:45be sure to give yourself that extra wiggle room to give enough time to work through those problems. 4:50And I know that this advice is super generic 4:54and can be applied to literally any kind of project, 4:57but nonetheless, it applies here with cloud migration. 5:01So if you're going to take away anything from this video, 5:03know that, one: cloud is really that cool. 5:06And although this can be a really daunting process, 5:09it's worth the effort and you should check it out. 5:13Thanks for watching. 5:13If you like this video, be sure to hit like and subscribe.