mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guangya Liu <gyliu...@gmail.com>
Subject Review Request 53929: Improved performance for `getQuotaRoleAllocatedResources` in allocator.
Date Sat, 19 Nov 2016 14:44:08 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53929/
-----------------------------------------------------------

Review request for mesos and Benjamin Mahler.


Repository: mesos


Description
-------

In allocator `getQuotaRoleAllocatedResources`, it is trying to omits
dynamic reservation, persistent volume info and additionally strip
`role` in it. But it is traversing all `Resource` object from the
`Resources` object, strip the `role` and then using `+=` to add each
`Resource` object back.

The `+=` for `Resource` object will invoke `validate` which will impact
the performance. This fix is calling `flatten()` directly to strip the
`role` for the all of the `Resource` objects and this will not invoke
`validate`.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp c8f9492ee1b69e125a1e841116d22a578a9b524e 

Diff: https://reviews.apache.org/r/53929/diff/


Testing
-------

make
make check

```
./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*"
./bin/mesos-tests.sh  --gtest_filter="*HierarchicalAllocator_BENCHMARK_Test.*/0" --benchmark
```


Thanks,

Guangya Liu


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message