Directory structures

Content Platform Tenant Management Help

File Size
4269 KB
Part Number

Because of the way HCP stores objects, the directory structures you create and the way you store objects in them can have an impact on performance. Here are some guidelines for creating effective directory structures. When creating namespaces you must know how the namespace is intended to be used. Following are some guidelines for effective directory usage:

Balanced directory usage

  • Plan your directory structures before storing objects. Make sure all namespace users are aware of these plans.
  • Avoid structures that result in a single directory getting a large amount of traffic in a short time. For example, if you ingest objects rapidly, use structures that do not store objects by date and time.
  • If you do store objects by date and time, consider the number of objects ingested during a given period of time when planning the directory structure. For example, if you ingest several hundred files per second, you might use a directory structure such as year/month/day/hour/minute/second. If you ingest just a few files per second, a less fine-grained structure would be better.
  • Follow these guidelines on directory depth and size:
    • Try to balance the namespace directory tree width and depth.
    • Do not create directory structures that are more than 20 levels deep. Instead, create flatter directory structures.
    • Avoid placing a large number of objects (greater than 100,000) in a single directory. Instead, create multiple directories and evenly distribute the objects among them.

Unbalanced directory usage

Avoid numerous nested directories. For example, a structure where each object is stored in its own directory. You must configure the namespace to use unbalanced directory if one or more of the following are true:

  • If your application uses a flat directory structure.
  • If your object access or usage is focused on a limited number of directories, or it is not possible to ensure a balanced directory structure.
  • If your application needs a more unstructured or semi-structured access to your data.