I have a migration where I have to transfer 100 million rows table from a SQL Server to Redshift. I have considered Data Migration Service but the processed took 5 hours to complete a 20 %. What other services could I use to migrate in less time with such a big dataset?
100mm is a nothing for redshift. I don’t know much about sql server though, does it have something like Postgres pg_dump?
Aws DMS. The database is Deployed on aws?
No, is on remote database
I have considered Data Migration Service but the processed took 5 hours to complete a 20 %. What other services could I use to migrate in less time with such a big dataset?
Is this a one time thing? If that is representative of the total time it would take to complete, that’s 25h, probably less time than it would take to find an alternative solution, test it, implement it, etc.
SQL server has bcp. It doesn’t do a very good job of serializing CSVs, but it is the fastest way to get bulk data in or out of SQL Server.
Chunk them into multiple csv’s, gzip and upload to S3, and COPY.
Have you tried Flywheel before? Seemed to work well with AWS
First option - Fastest way might be glue, if you want to skip writing either parquet files, flat files, or anything else. Total size will be greater this way, so your ingress costs may be higher.
Second option- The other alternative may be to export the objects as csv (which you can use locally on your sql server host). Probably easiest but tedious. Copy them manually, use glue or Athena to source them into redshift.
Third option - export the sql tables to parquet using a python script. Copy them manually, same as option 2.
Depends on how many tables you have, how big they are, and how often you need to do this.
My 2c
You’re good at that thing in the last sentence. I need to get gooder at that.
You get a sync going between your remote and your AWS db, then fail over to it. I’f it can’t catch up you can alway block connections until it syncs up, given it’s only a subset of the data it will be shorter then your Database migration Service
DMS can hook to on-premise rdbms
What instance class on the dms task?
If DMS is too slow for you and this is going to be a repeated activity you can look into AWS Batch.
What data is it ?
You could export to an intermediate format, CSV or parquet for example. Put the data in S3 and use Redshift Spectrum to read the data and just insert to a normal redshift table.
I had similar situation before that we need to migrate over 40GB redis cluster data to the cloud service provided by the redis enterprise, and it was production environment, and we tried many tools that do live streaming from one cluster to another, we tested in staging environment to find it takes 2 days, at last we just bgsave the whole cluster to several partition files and transferred to an EC2 machine and replay them to the enterprise redis, which took less than 3 hours!
The lesson learned is that always test the very basic method first to get the baseline!
May the brute force be with you!
The best strategy would be to do a bulk export to flat files and then LOAD it into redshift. In both instances you are using the native load and unload features of the respective databases
100m does on redshift is nothing. I have a not so old post benchmarking something that’s half that size, with a lot of columns. https://www.reddit.com/r/dataengineering/s/r99Y2JGhcB
It should be importing in minutes not hours.
If I were to guess you are doing INSERT instead of COPY or something else that’s strange.
I would write a small app/script to do that in a streaming manner. I never try to find the tool if objectives are clear. It will take more time to find/test than to write.
Something that has not been mentioned you might want to setup a data streaming solution like kafka (msk), i’m not sure if aws kinesis supports a sql server directly. Optionally can store into s3 before storing into redshift, or go directly from msk to redshift.
SQL Server → Kafka (MSK) → S3 (optional) → Redshift
Have trialed increasing the size of the DMS instance? and seeing how that affects performance?