Opened 7 years ago

Last modified 7 years ago

#4411 new defect

datastore needs to limit number of files stored in each directory

Reported by: krstic Owned by: tomeu
Priority: high Milestone: Future Release
Component: sugar-datastore Version:
Keywords: Cc: krstic
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no

Description (last modified by krstic)

Currently, the datastore puts all the binary objects associated with datastore entries in a single directory. The same happens with thumbnails.

Having too many files in a single directory isn't pretty on most filesystems, and JFFS2 is no exception. In fact, because of the semantics of deletion dirents on JFFS2, the datastore situation is doubly bad, since all the filenames for the binary objects have the same length as they're UUIDs.

The solution is to add a directory level, with directory names being the first two characters of the UUID. e.g. the file 397a8f20-ad13-42e0-ac5d-b3b5191ccdf2 should be stored in datastore/store/39/7a8f20-ad13-42e0-ac5d-b3b5191ccdf2. Thumbnails should work the same way.

Change History (2)

comment:1 Changed 7 years ago by krstic

  • Description modified (diff)

comment:2 Changed 7 years ago by marco

  • Milestone changed from Update.2 to Future Release
Note: See TracTickets for help on using tickets.