2

For the older version of data loader this was possible by following the guide below:

https://help.salesforce.com/articleView?id=000329565&language=en_US&type=1&mode=1

From the desktop icon right click and modify:

"C:\Program Files (x86)\salesforce.com\Data Loader\Java\bin\javaw.exe" -Xms1024m -Xmx1256m -Dappdata.dir="C:\Users\\AppData\Roaming" -jar "C:\Program Files (x86)\salesforce.com\Data Loader\dataloader-26.0.0-uber.jar"

The newer version (47.0) of data loader kicks off using a Windows batch file.

How do I go about allocating more memory to the JVM which Data Loader runs in?

I am using Zulu OpenJDK version 11 for Windows per the documentation from Salesforce below:

https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/loader_install_windows.htm

enter image description here

1 Answer 1

5
+50

Note that the article you link says that:

Newer Dataloader versions (45 and up) that use Zulu Java manage heap size differently and should not need to do this.

Are you certain that this is what you need to do? What are you doing that's bringing a memory error that you believe will be resolved by this?

That said, it's straightforward enough to pass those memory allocation options in the batch file. The -Xmsn and -Xmxn options to set the minimum and maximum size of the memory allocation are also available in OpenJDK:

-Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics @ http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html Examples: -Xms6291456 -Xms6144k -Xms6m

-Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics @ http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html Examples: -Xmx83886080 -Xmx81920k -Xmx80m

So, use VS Code (or Notepad or other text editor) to open the .bat file that the desktop shortcut points to (C:\Users\[username]\dataloader\[API version]\dataloader.bat by default). Find the line that runs Java with the JAR file:

"%ZULU_JAVA_HOME%\java" -jar dataloader-48.0.0-uber.jar salesforce.config.dir=configs

and add your memory allocation options before the -jar parameter:

"%ZULU_JAVA_HOME%\java" -Xms1024m -Xmx1256m -jar dataloader-48.0.0-uber.jar salesforce.config.dir=configs

Save the batch file, and run Dataloader from the desktop shortcut.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .