Temporary folder
To improve asset upload times, use high performance storage for the Java temporary directory. On Linux and Windows, a RAM drive or SSD could be used. In cloud-based environments, an equivalent high speed storage type could be used. For example, in Amazon EC2, an ephemeral drive drive can be used for the temporary folder.
Assuming the server has ample memory, configure a RAM drive. On Linux, run these commands to create an 8 GB RAM drive:
mkfs -q /dev/ram1 800000
mkdir -p /mnt/aem-tmp
mount /dev/ram1 /mnt/aem-tmp
df -H | grep aem-tmp
On Windows OS, use a third-party driver to create a RAM drive or just use high performance storage such as SSD.
Once the high performance temporary volume is ready, set the JVM parameter -Djava.io.tmpdir
. For example, you could add the JVM parameter below to the CQ_JVM_OPTS
variable in the bin/start
script of Experience Manager:
-Djava.io.tmpdir=/mnt/aem-tmp
Java configuration
Java version
Adobe recommends deploying Experience Manager Assets on Java 8 for optimum performance.
JVM parameters
Set the following JVM parameters:
-XX:+UseConcMarkSweepGC
-Doak.queryLimitInMemory
=500000-Doak.queryLimitReads
=100000-Dupdate.limit
=250000-Doak.fastQuerySize
=true
Data store and memory configuration
File data store configuration
Separating the data store from the segment store is recommended for all Experience Manager Assets users. In addition, configuring the maxCachedBinarySize
and cacheSizeInMB
parameters can help maximize performance. Set maxCachedBinarySize
to the smallest file size that can be held in the cache. Specify the size of the in-memory cache to use for the datastore within cacheSizeInMB
. Adobe recommends you set this value between 2-10 percent of the total heap size. However, load/performance testing can help determine the ideal setting.
Configure the maximum size of the buffered image cache
When uploading large amounts of assets to Adobe Experience Manager, to allow for unexpected spikes in memory consumption and to prevent JVM fails with OutOfMemoryErrors, reduce the configured maximum size of the buffered image cache. Consider an example that you have a system with a maximum heap (- Xmx
param) of 5 GB, an Oak BlobCache set at 1 GB, and document cache set at 2 GB. In this case, the buffered cache would take maximum 1.25 GB and memory, that would leave only 0.75 GB memory for unexpected spikes.
Configure the buffered cache size in the OSGi Web Console. At https://host:port/system/console/configMgr/com.day.cq.dam.core.impl.cache.CQBufferedImageCache
, set the property cq.dam.image.cache.max.memory
in bytes. For example, 1073741824 is 1 GB (1024 x 1024 x 1024 = 1 GB).
From Experience Manager 6.1 SP1, if you’re using a sling:osgiConfig
node for configuring this property, make sure to set the data type to Long. For more details, see CQBufferedImageCache consumes heap during Asset uploads.
Shared data stores
Implementing an S3 or Shared File Datastore can help to save disk space and increase network throughput in large-scale implementations. For more information on the pros and cons of using a shared datastore, see Assets sizing guide.
S3 data store
The following S3 Data Store configuration ( org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.cfg
) helped Adobe extract 12.8 TB of binary large objects (BLOBs) from an existing file data store into an S3 data store at a customer site:
accessKey=<snip>
secretKey=<snip>
s3Bucket=<snip>
s3Region=us-standard
s3EndPoint=<a href="https://s3.amazonaws.com/">s3.amazonaws.com</a>
connectionTimeout=120000
socketTimeout=120000
maxConnections=80
writeThreads=60
concurrentUploadsThreads=30
asyncUploadLimit=30
maxErrorRetry=1000
path=/opt/author/crx-quickstart/repository/datastore
s3RenameKeys=false
s3Encryption=SSE_S3
proactiveCaching=true
uploadRetries=1000
migrateFailuresCount=400
Network optimization
Adobe recommends enabling HTTPS because many companies have firewalls that sniff HTTP traffic, which adversely impacts uploads and corrupts files. For large file uploads, ensure that users have wired connections to the network because a WiFi network becomes quickly saturated. For guidelines on identifying network bottlenecks, see Assets sizing guide. To assess network performance by analyzing network topology, see Assets network considerations.
Primarily, your network optimization strategy depends upon the amount of bandwidth available and the load on your Experience Manager instance. Common configuration options, including firewalls or proxies can help improve network performance. Here are some key points to bear in mind:
- Depending upon your instance type (small, moderate, large), ensure that you have sufficient network bandwidth for your Experience Manager instance. Adequate bandwidth allocation is especially important if Experience Manager is hosted on AWS.
- If your Experience Manager instance is hosted on AWS, you can benefit by having a versatile scaling policy. Upsize the instance if users expect high load. Downsize it for moderate/low load.
- HTTPS: Most users have firewalls that sniff HTTP traffic, which can adversely impact uploading of files or even corrupt files during the upload operation.
- Large file uploads: Ensure that users have wired connections to the network (WiFi connections saturate quickly).