Skip to content

How do I improve the speed of an AWS DMS task that has LOB data?

4 minute read
0

My AWS Database Migration Service (AWS DMS) migration task is slow. I want to improve the speed of an AWS DMS task that has large binary object (LOB) data.

Resolution

AWS DMS offers the following three large binary object (LOB) handling modes:

  • Full LOB mode
  • Limited LOB mode
  • Inline LOB mode

Choose the right mode based on the actual size of the LOB data in your source tables, is the most effective way to improve task performance.

Full LOB mode

In Full LOB mode, AWS DMS migrates LOBs regardless of size. Because no maximum LOB size is defined, AWS DMS must look up and migrate each LOB individually. This can slow down your task significantly. The tradeoff is that AWS DMS never truncates the data, because it doesn't assume a maximum size up front.

To configure Full LOB mode, set FullLobMode to true and specify a LobChunkSize value in kilobytes (KB). The recommended LobChunkSize value is 64 KB. A value that's significantly higher than 64 KB can cause task failures.

To improve performance when you use Full LOB mode across multiple tables, take the following actions:

  1. Identify the size of the largest LOB in your source database.
  2. If the largest LOB is only a few megabytes (MBs) or less, then switch to Limited LOB mode instead for better performance.
  3. If some tables have LOBs larger than a few MB, then isolate those tables into a separate AWS DMS task that uses Full LOB mode. As a best practice, run this separate task on its own replication instance. This prevents the slower LOB processing from competing for resources with the rest of your migration.

Limited LOB mode

In Limited LOB mode, you specify a maximum LOB size up front. AWS DMS pre-allocates memory for LOB columns and applies them in bulk. This is significantly faster than the row-by-row lookups that Full LOB mode requires. If any LOB exceeds the size you specify, then AWS DMS truncates it and writes a warning to the AWS DMS task log.

To configure Limited LOB mode, set LimitedSizeLobMode to true and specify a LobMaxSize value in KB. The maximum value is 102,400 KB or 100 MB.

Complete the following steps before you run the task:

  1. Identify the maximum LOB size that exists in your source data. Don't rely on an assumed or worst-case estimate.
  2. Set LobMaxSize to match that maximum size. This gives you the performance benefit of Limited LOB mode without truncating legitimate data.
  3. Allocate sufficient memory to your replication instance. Limited LOB mode's performance gain depends on enough memory to buffer and batch-apply the LOB data.

To configure Inline LOB mode, complete the following steps:

  1. Set FullLobMode to true. Inline LOB mode is only available when Full LOB mode is active. The InlineLobMaxSize has no effect otherwise.
  2. Set InlineLobMaxSize to a value in KB with a range of 1 to 102,400 KB or 100 MB. The default value is 0 turns off inline transfer.

During the full load, AWS DMS checks each LOB's size. LOBs smaller than InlineLobMaxSize are transferred inline as part of the row data. LOBs larger than InlineLobMaxSize use standard Full LOB mode chunking.

Important: Set a value for InlineLobMaxSize only if most LOBs in your source data are smaller than that value. If most LOBs are large, then most rows still fall back to Full LOB mode handling. Inline LOB mode applies only during the full load phase. It has no effect on LOBs replicated during change data capture (CDC).

When you specify the task settings, you must set the InlineLobMaxSize parameter.

Example task settings JSON file:

{
  "TargetMetadata": {
    "TargetSchema": "abc",
    "SupportLobs": true,
    "FullLobMode": true,
    "LobChunkSize": 64,
    "LimitedSizeLobMode": false,
    "LobMaxSize": 0,
    "InlineLobMaxSize": 32,
    "LoadMaxFileSize": 0,
    "ParallelLoadThreads": 0,
    "ParallelLoadBufferSize": 0,
    "BatchApplyEnabled": false,
    "TaskRecoveryTableEnabled": false,
    "ParallelLoadQueuesPerThread": 0,
    "ParallelApplyThreads": 0,
    "ParallelApplyBufferSize": 0,
    "ParallelApplyQueuesPerThread": 0
  }
}

Related information

Migrating large binary objects (LOBs)

Target metadata task settings

Best practices for AWS Database Migration Service

AWS OFFICIALUpdated 3 months ago
3 Comments

Hi,

Regarding this one

Limited LOB mode When you use Limited LOB mode, you specify the maximum size of LOB column data. This allows AWS DMS to preallocate resources and apply the LOBs in bulk. If the size of the LOB columns exceeds the size that you specified in the task, then AWS DMS truncates the data. AWS DMS then sends warnings to the AWS DMS log file. Limited LOB mode improves performance, but before you run the task, you must identify the maximum LOB size of the data on the source. Then, specify the Max LOB size parameter when you use Limited LOB mode. To handle the task, it's a best practice to allocate enough memory to the replication instance.

For you must identify the maximum LOB size of the data on the source

Can we use the script as noted in https://pages.awscloud.com/rs/112-TZM-766/images/EV_best-practices-for-migrating-from-oracle-to-amazon-aurora_Jul-2021.pdf? I assume this settings also apply to Oracle RAW datatype, is that correct?

replied 2 years ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

AWS
MODERATOR

replied 2 years ago

This article was reviewed and updated on 2026-08-24.

EXPERT

replied 3 months ago