Repository Assets Performance Tuning
Restrict Large Asset Uploads
When using MySQL as your database, you can increase the max_allowed_packet variable to support larger asset uploads. For configuration steps, see increase packet size.
However, increasing this value can negatively impact performance. Limit asset size where possible to maintain optimal repository performance.
Optimizing PDF Asset Storage
When you upload a PDF through the CMS, the repository stores the PDF binary on the hippo:resource node. In addition, the extracted text from the PDF is saved in the binary property hippo:text.
This approach addresses the high CPU cost of extracting text from PDFs for Lucene indexing using Apache Tika. Extracting text from a PDF is resource-intensive, as it requires parsing the file contents.
The repository only extracts text from a PDF if the hippo:text property is not already present. If hippo:text exists, the repository uses the stored text for indexing.
Storing the extracted text in the hippo:text property provides two key benefits:
- Only one cluster node performs the expensive PDF text extraction. Other cluster nodes use the existing
hippo:textproperty. - Reindexing PDF assets is faster and less resource-intensive.
If you add PDF files to the repository outside the CMS UI (for example, via an importer tool or REST endpoint), extract the text from each PDF and store it in the hippo:text property. This practice ensures efficient indexing and reduces CPU load during reindexing.