Project

General

Profile

Bug #1838

Reevaluate LBCommTable initialization

Added by Sam White 4 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
03/28/2018
Due date:
% Done:

0%


Description

This is what LBCommTable currently looks like:

class LBCommTable {
    LBCommTable() {
        NewTable(initial_sz);
    }
    void NewTable(int _sz) {
        set = new LBCommData[_sz];
        state = new TableState[_sz];
        cur_sz = _sz;
        in_use = 0;
        for(int i=0; i < _sz; i++)
            state[i] = nil;
    }
    enum { initial_sz = 10000 };

I haven't dived in to how this is used but just noticed that these are probably taking up more memory than is needed.
Is this allocated once per PE, once per Node, or what? Why is it initialized to 10,000? Each of the elements in those arrays are something like 64+ Bytes in size. The arrays should likely be replaced by vectors that reserve some more conservative amount of space, rather than C-style arrays.

History

#1 Updated by Sam White 4 months ago

LBCommData is 88 Bytes, and TableState is 4 Bytes.

This commit cuts TableState from 4 Bytes to 1 Byte: https://charm.cs.illinois.edu/gerrit/#/c/3913/

This commit reduces initial_sz from 10,000 to 1,000 which is I think reasonable? https://charm.cs.illinois.edu/gerrit/#/c/3915/

In all, these take the initial size of LBCommTable from 920,024 Bytes to 89,024 Bytes.

There is one LBCommTable per PE.

#2 Updated by Eric Bohm 2 months ago

  • Assignee set to Juan Galvez

Also available in: Atom PDF