sophia: refactor index memory usage stats