Skip to content

Commit

Permalink
lib/storage: metaindexRow use memroy more efficiently (VictoriaMetric…
Browse files Browse the repository at this point in the history
…s#655)

due to memory align the metaindexRow structure use 64-byte pre object.
this commit changes the order of field, make metaindexRow use 56-byte pre
object.

Signed-off-by: Sasasu <[email protected]>
  • Loading branch information
Sasasu authored and valyala committed Jul 27, 2020
1 parent f26ef58 commit 96bc476
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/storage/metaindex_row.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ type metaindexRow struct {
// TSID is the first TSID in the corresponding index block.
TSID TSID

// BlockHeadersCount is the number of block headers
// in the given index block.
BlockHeadersCount uint32

// MinTimestamp is the minimum timestamp in the given index block.
MinTimestamp int64

Expand All @@ -29,6 +25,10 @@ type metaindexRow struct {
// IndexBlockOffset is the offset of index block.
IndexBlockOffset uint64

// BlockHeadersCount is the number of block headers
// in the given index block.
BlockHeadersCount uint32

// IndexBlockSize is the size of compressed index block.
IndexBlockSize uint32
}
Expand Down

0 comments on commit 96bc476

Please sign in to comment.