Aem segmentstore vs datastore
HI,
In Adobe Aem which contents are saved in the segmentstore and which are saved in the datastore?
What is the difference between the two?
Thank you
HI,
In Adobe Aem which contents are saved in the segmentstore and which are saved in the datastore?
What is the difference between the two?
Thank you
Hey Roberto -
In overly-simplistic terms, the Segmentstore contains all of the metadata about each of the nodes in the repository, including the content tree itself, and all of the textual information about each node. The Datastore is used for larger objects that need to be stored in AEM, which could be text data or binaries.
There's a base configuration in Jackrabbit Oak which tells the system what the minimum size is of objects that should be stored in the Datastore vs the Segmentstore, which I believe still sits at 16KB. So, let's say you add a page node to AEM, and then put 2KB of text in the page. That entire object is then living in the segmentstore. But let's say you upload a 100KB PDF - in that case, the metadata about the PDF (its title, description, jcr properties, location, tags, etc) all are physically stored in the segmentstore, but the binary data of the PDF itself is stored in the datastore with only pointers in the segmentstore to where to find it.
This is why there are two different maintenance jobs in AEM - one to clean up the segmentstore, the other to clean up the datastore. If, let's say, the reference to that PDF is deleted in AEM, it would only get flagged for deletion in the segmentstore, but would then still be on disk. The revision clean-up job would then be able to reclaim that disk space out of the segmentstore when it runs, but the datastore would still contain the binary data for that PDF until the datastore cleanup job gets run, to remove any now-unreferenced objects out of the datastore.
Hope that helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.