Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.0.0
-
None
-
None
Description
List<Cell> getCellList(byte[] family) { List<Cell> list = this.familyMap.get(family); if (list == null) { list = new ArrayList<Cell>(); } return list; }
Creates list of size 10, this is up to 80 bytes per column family in mutation object.
Suggested:
List<Cell> getCellList(byte[] family) { List<Cell> list = this.familyMap.get(family); if (list == null) { list = new ArrayList<Cell>(CELL_LIST_INITIAL_CAPACITY); } return list; }
CELL_LIST_INITIAL_CAPACITY = 2 in the patch, this is debatable. For mutation where every CF has 1 cell, this gives decent reduction in memory allocation rate in both client and server during write workload. ~2%, not a big number, but as I said, already, memory optimization will include many small steps.
Attachments
Attachments
Issue Links
- is part of
-
HBASE-15492 Memory usage optimizations
- Closed