Processing 100M+ Rows in Talend Without Running Out of Memory
Last updated: October 2026
Quick answer: Talend's default JVM heap is too small for 100M+ rows. Increase it to 4-8GB with -Xmx8g. Replace row-by-row inserts with bulk operations, using the database-specific bulk components such as tSnowflakeOutputBulkExec or tMysqlBulkExec. For large lookups, use tMap's "Reload at each row" with a lookup query filtered by a global variable, or "Store temp data", instead of loading everything into memory. Parallelize independent sub-jobs with tParallelize, and stage intermediate data to disk with tFileOutputDelimited instead of holding it in memory.
Introduction
Every Talend developer hits the same wall eventually: the job works fine on 1 million rows, then you point it at the production dataset with 100 million rows and get java.lang.OutOfMemoryError: Java heap space. The default Talend configuration isn't built for large datasets. This guide covers every optimization we've used across dozens of production Talend implementations to process datasets with 100M+ rows reliably. For the specific heap memory error and its quick fixes, see our heap memory troubleshooting guide.
Why Talend Runs Out of Memory
Talend jobs run on the JVM. The default heap size in Talend Studio is typically 1-2GB. That sounds like a lot until you realize what's happening in memory during a tMap operation.
When tMap loads a lookup, it reads every row from the lookup source into a Java HashMap. Each row becomes a HashMap entry with the key column(s) as the key and the entire row as the value. A 50-million-row lookup table with 10 columns of average width? That's easily 4-6GB of heap. Your 2GB JVM doesn't stand a chance.
The other common culprit is row-by-row database operations. tDBOutput with the "Insert" action sends one INSERT statement per row unless batch mode is enabled, and it commits every N rows as set in "Commit every". On 100M rows, that's 100M individual INSERT statements and network round-trips, with the JDBC driver holding transaction state in memory for each commit interval. That is slow, and it puts steady pressure on memory.
Increasing JVM Heap Size
The first fix is the simplest: give the JVM more memory. In Talend Studio, go to Run > Advanced Settings > JVM Settings and add:
-Xmx8g -Xms4g -XX:+UseG1GC
-Xmx8gsets the maximum heap to 8GB. Go higher if your server has the RAM.-Xms4gsets the initial heap to 4GB, avoiding the overhead of incremental allocation.-XX:+UseG1GCselects the G1 garbage collector, which suits large heaps. G1 is already the default on the Java 17 and 21 runtimes that current Talend Studio uses, so the flag matters mainly on small machines or older Java 8 runtimes.
For exported jobs (running outside Studio), edit the generated shell script. Find the java command and modify the -Xmx parameter. On TAC, set these in the job execution server configuration. In Qlik Talend Cloud, Jobs run on a Remote Engine managed from Talend Management Console.
Important: increasing heap only raises the ceiling. If your job's memory usage grows linearly with data volume, you'll hit the wall again at 200M rows. The real fixes are below.
Talend estate that still has to run? We do both sides of this: tuning the jobs you are keeping, and moving the ones you are not onto dbt, Snowflake or ADF. Migrations go job by job with old and new running side by side until the counts reconcile, so you can prove it before anything gets switched off.
Book a Talend review How we handle Talend estatestMap Lookup Strategies
tMap is the biggest memory consumer in most Talend jobs. It has 3 lookup loading strategies, and picking the right one is critical. For a deeper dive into tMap troubleshooting, see our Talend performance tuning guide.
"Load Once" (Default)
The default behavior: tMap reads the entire lookup table into memory before processing the first main row. Fast for small lookups (under 1M rows). Catastrophic for large ones. A 50M-row lookup loaded this way will consume 4-6GB of heap, leaving nothing for the actual transformation.
"Reload at Each Row"
tMap reads the lookup again for every row in the main flow. On its own, this model loads all the records of the lookup flow for each main row, which is far slower than Load once. It only pays off when the lookup query is filtered: set a global variable from the main row (for example with tSetGlobalVar) and use it in the lookup query's WHERE clause, so each read returns only the matching rows. On 100M main rows that's still 100M queries, so you need an index on the lookup join column.
When to use it: when the lookup table is large (10M+ rows), the main flow is comparatively small, and the lookup query is filtered on an indexed join column.
"Reload at Each Row (Cache)"
This model keeps lookup records in an in-memory cache and only loads records that aren't already cached. If the same key appears multiple times in the main flow, it serves from cache instead of re-querying, which helps when main flow rows frequently hit the same lookup keys. It can't be combined with "Store temp data".
tHashInput and tHashOutput: In-Memory Caching
The tHashInput/tHashOutput pair stores intermediate data in an in-memory cache. Writing a dataset to tHashOutput and reading it back from tHashInput in a later sub-job is convenient, but it doesn't save memory: the cached data stays in the heap, and Qlik warns that loading it consumes a lot of memory. Both components are hidden from the Palette by default and must be enabled under Project Settings, Designer, Palette Settings.
Use the pattern to reuse a moderate dataset across sub-jobs: sub-job 1 writes it to tHashOutput, and sub-job 2 uses tHashInput as the lookup source in tMap. For a lookup that doesn't fit in memory, use "Store temp data" or push the join into the database instead.
Bulk Loading Instead of Row-by-Row
This is probably the single biggest performance improvement you can make. The difference between tDBOutput (row-by-row) and a bulk component such as tSnowflakeBulkExec or tMysqlBulkExec (bulk load) on 100M rows is the difference between 8 hours and 15 minutes. It's an architectural change.
For Snowflake, use tSnowflakeOutputBulk to write the files and upload them to a stage and tSnowflakeBulkExec to run the COPY INTO, or the combined tSnowflakeOutputBulkExec (installed through the Feature Manager). For MySQL, use tMysqlBulkExec with LOAD DATA INFILE. For PostgreSQL, tPostgresqlBulkExec uses the COPY command. For a detailed comparison between output components, see our tDBOutput vs tDBOutputBulk vs tDBBulkExec guide.
tFileInputDelimited --> tMap --> tSnowflakeOutputBulk (write and upload files to a stage)
then, on OnSubjobOk: tSnowflakeBulkExec (COPY INTO the table)
The pattern: transform your data and write it with tSnowflakeOutputBulk, which writes the files and uploads them to a Snowflake internal stage, S3 or Azure. Then tSnowflakeBulkExec loads them in one COPY INTO operation. For other databases, use the matching OutputBulk and BulkExec pair, such as tMysqlOutputBulk and tMysqlBulkExec. The file write is sequential and memory-efficient. The bulk load uses the database's optimized import path.
Parallelization with tParallelize and tPartitioner
tParallelize runs independent sub-jobs concurrently. If you're processing 10 input files, tParallelize can process all 10 simultaneously (limited by available CPU cores and memory). Each parallel execution gets its own thread with its own memory allocation.
tPartitioner splits a single data flow into a set number of parallel threads, set in "Number of Child Threads" (a common starting point is the number of CPU cores minus one), and must be followed by tCollector. With "Use a key hash for partitions", rows with the same key, such as the same customer_region, go to the same thread, so the rows per thread depend on how the keys are distributed. This works well when the downstream processing is CPU-bound rather than I/O-bound.
Gotcha: parallelization multiplies memory usage. 4 parallel threads each using 2GB of heap means you need at least 8GB total. Set your -Xmx accordingly, and don't parallelize more threads than your server has CPU cores.
Sorting Large Datasets Without Memory Overflow
Sorting 100M rows in memory requires loading all rows into a data structure, which is exactly what you're trying to avoid. Use tSortRow with "Sort on disk" selected in Advanced settings. It sorts in chunks written to a temp data directory, controlled by "Buffer size of external sort", instead of holding every row in memory. tBufferOutput is a different tool: it collects rows in a memory buffer, usually so a parent Job can read a child Job's output through tRunJob, and it doesn't spill to disk or sort.
For external sorting on really large datasets, write to tFileOutputDelimited first, then use a system-level sort command (or break the file into sorted chunks and merge them). This is more work to set up but handles datasets of any size without memory concerns.
Database Connection Management
Two settings that matter a lot at scale:
- Commit interval: The output component's "Commit every" field sets how many rows go into each commit. At 10,000 rows, 100M rows means 10,000 commits. Each commit requires the database to flush its write-ahead log. Increase the commit interval to 100,000 or even 500,000 for large batch loads. This reduces commit overhead by 10-50x.
- Connection pooling: If your job has multiple sub-jobs hitting the same database, use
tDBConnectionat the beginning to create a shared connection. Without this, each sub-job opens and closes its own connection, which adds connection establishment overhead (200-500ms per connect on most databases) and can exhaust your database's connection pool.
tFileOutputDelimited as Intermediate Staging
When you have a complex multi-step transformation, don't try to do everything in one continuous flow. Break it into stages with file-based handoffs. Stage 1 reads source data, applies initial transformations, and writes to a temp file. Stage 2 reads the temp file, joins with lookup data, and writes to another temp file. Stage 3 bulk-loads the final file into the target database.
Each stage runs independently, processes data row-by-row (streaming, not buffered), and releases memory when it completes. The disk I/O overhead is minimal compared to the memory savings. On a modern SSD, writing and reading a 100M-row CSV file takes 3-5 minutes. That's nothing compared to the hours you'd lose debugging an out-of-memory crash at row 87 million.
Production Performance Checklist
- Use bulk operations for all database writes. Bulk components such as tSnowflakeOutputBulkExec or tMysqlBulkExec are much faster than tDBOutput for large datasets.
- Increase heap to 4-8GB with
-Xmx. G1 is already the default garbage collector on Java 17 and 21. - Sort on disk with tSortRow's "Sort on disk" option, or with an external sort on a staged file, instead of sorting in memory.
- Parallelize independent sub-jobs with tParallelize. Don't exceed CPU core count.
- Minimize tLogRow usage in production. tLogRow writes to stdout for every row. On 100M rows, that's 100M console writes. Disable it or replace with tFileOutputDelimited for debugging output.
- Disable statistics monitoring in production runs. The Talend statistics panel (row counts, throughput) adds measurable overhead. In Studio, uncheck "Statistics" before running large jobs. In exported jobs, remove the
--statflag. - Set commit intervals to 100K+ rows for database output components.
- Pick the tMap lookup model deliberately for large lookups: "Reload at each row" with a filtered lookup query, or "Store temp data" when the lookup won't fit in memory.
Gotcha: tMap's "Store Temp Data" Option
tMap has a "Store temp data" property, set to true on the lookup table, that writes intermediate data to disk instead of holding it in memory. Sounds like a silver bullet for memory issues, and it does prevent out-of-memory errors. But it adds 30-40% processing overhead because every row gets serialized to disk and deserialized back. On 100M rows, that's significant.
Use "Store temp data" as a safety net for jobs that occasionally process large datasets but usually handle smaller ones. If your job always processes 100M+ rows, it's better to redesign the pipeline (bulk loads, file staging, partitioning) than to rely on temp data spilling.
Key Takeaways
- Talend's default configuration can't handle 100M+ rows. You need to change JVM settings, component choices, and pipeline architecture.
- The biggest win is switching from row-by-row inserts to bulk operations. This alone can cut job runtime from hours to minutes.
- tMap lookup strategy matters: "Load once" for small lookups, "Reload at each row" with a filtered lookup query on an indexed join column for large lookups.
- Break complex jobs into file-based stages. Disk I/O is cheap; memory crashes are expensive.
- Parallelization helps CPU-bound jobs but multiplies memory usage. Plan heap accordingly.
- For lookups too large for memory, use "Store temp data" or push the join into the database.
Related Articles
Frequently Asked Questions
Q: Why does Talend run out of memory on large datasets?
Talend runs on the JVM with a default heap size of 1-2GB. The tMap component loads lookup data entirely into memory by default. With a 50M-row lookup table, the HashMap holding that data can easily exceed available heap, causing an OutOfMemoryError.
Q: How do I increase Talend's JVM heap size?
In Talend Studio, go to Run > Advanced Settings > JVM Settings and set -Xmx4g or -Xmx8g. For exported jobs, edit the shell script and modify the java command's -Xmx parameter. For TAC, set heap parameters in the job's execution configuration; in Qlik Talend Cloud, Jobs run on a Remote Engine.
Q: How do I handle very large lookups in tMap?
Choose the lookup model deliberately. Load once keeps the whole lookup in memory, so use it for small lookups. Reload at each row reads the lookup for every main row, which only works well when the lookup query is filtered by a global variable set from the main row. Store temp data writes lookup data to disk when memory is tight, and pushing the join into the database avoids the in-memory lookup altogether.
Q: Should I use tParallelize or tPartitioner for multi-threaded processing?
tParallelize runs independent sub-jobs concurrently (good for processing multiple files in parallel). tPartitioner splits a single data flow into a set number of threads, optionally keeping rows with the same key hash together. Use tParallelize for independent tasks and tPartitioner for splitting a single large dataset.
Still have questions?
Get AssistanceReady? Let's Talk!
Get expert insights and answers tailored to your business requirements and transformation.
Get Assistance