Thanks to recent product improvements, it is now possible to configure Java Heap Space settings for the Cross Platform edition of Sync on Windows machines! This allows you to set a higher maximum value for the Java Heap space, which is sometimes required with Sync jobs that are replicating large datasets. This feature is supported in cross-platform versions of CData Sync 23.3.8608.0 and newer.
By default, a Java virtual machine will automatically assign a maximum heap space of 1/4 of the available system memory and a minimum space of 1/64 of system memory. On machines with limited memory, the Java Virtual Machine may assign too little a maximum memory to heap space for large Sync operations which can result in job failures with Java Heap Space errors.
Windows Instructions:
On these newer Sync releases, you will be able to set Heap Space flags in the "sync.exe.config" file that will persist after every startup and shutdown. To do this you first have to locate the "sync.exe.config" file in your Sync installation. In standard Sync installations on Windows devices, this should be located at:
"C:\Program Files\CData\CData Sync\sync.exe.config"
You will need to open this XML Configuration File as an administrator to save any edits. Once there, the steps to set your heap space flags are short. As an example, simply add the following after the startup statement to specify a minimum Java Heap Space of 2GB and a maximum Heap Space of 10GB on service startup:
<appSettings>
<add key="JAVA_OPTS" value="-Xms2g -Xmx10g"/>
</appSettings>
“-Xms2g” represents a minimum heap space size of 2GB.
“-Xmx10g” represents a maximum heap space size of 10GB.
Once in place, your entire sync.exe.config file would look like the this:

Linux Instructions:
If you are operating Sync from a Linux-based machine, there are two ways you can change the heap size. These two ways depend on how you are running Sync - via command, or via a service.
If you are running Sync as a service, you will need to edit the service file "cdatasync.service" that Sync is run from after installation. Note that there is a service.sh file that is only used during the installation of Sync and not used regularly to run Sync. However the service file that it creates (cdatasync.service) can be edited and you can add heap space flags there.
Please note that the jdk path and path to the service file may differ depending on OS and your exact setup, so this is intended as an example.
1) Edit /etc/systemd/system/cdatasync.service
(for example: sudo nano /etc/systemd/system/cdatasync.service)
Please note that depending on the version and virtual machine environment, the cdatasync.service file may simply be named sync.service. To verify the service file before proceeding further, you can use the ls command to list all of the files within the system directory to locate your service file specifically:
(for example: ls -a /etc/systemd/system)
2) Change your ExecStart variable to include JVM parameters
(for example this might look like: /home/ubuntu/jre/jdk-17.0.5+8/bin/java -jar -Xmx8GB "/home/ubuntu/sync.jar")

3) Run the command systemctl daemon-reload
4) Restart the Sync service. This command may vary based on the service service file located in step 1.
(for example: systemctl restart cdatasync)
If you are running Sync via the command line, you can specify the heap size properties in the command used to start Sync.
It is important to note that you do not need a minimum heap space flag to make use of this feature. In fact, it may often be better to let the Java Virtual Machine decide a minimum value so that the actual memory used can grow dynamically with need. While we want enough space to be available for jobs to succeed (what the maximum value is allowing), we should allow a JVM to use the minimal amount of memory needed to save on performance and memory operations.
Another important note is that the maximum heap space should never be set to the total available system memory as the machine will need space for additional processes and applications.

