Re: MESOS: Improve the performance of Resources.

2016-07-12 Thread Joris Van Remoortere
I used callgrind to instrument the `allocate` function during one of the iterations of the allocator benchmarks. The ~2x came from the cpu cycle count reduction. As I said, that number wasn't within the range I was interested in, so I didn't spend much time on it. Rather I was using the callgrind

Re: MESOS: Improve the performance of Resources.

2016-07-11 Thread Guangya Liu
Hi Joris, For `2x` number, can you please show more detail for how did you do and evaluate the test? How did you compare the result? Did you have any test code to share? Thanks, Guangya On Mon, Jul 11, 2016 at 6:05 PM, Klaus Ma wrote: > Hi Joris, > > For `Scalars`,

Re: MESOS: Improve the performance of Resources.

2016-07-11 Thread Klaus Ma
Hi Joris, For `Scalars`, yes, it's also dynamic allocated in `Resources::mutable_scalar()`. For `2x` number, do you have any patch to share? Tested cases this afternoon: add resources including 100 roles (1 CPU for each); the performance is downgrade a lot; so I agree with you to improve some

Re: MESOS: Improve the performance of Resources.

2016-07-11 Thread Joris Van Remoortere
+Dev Hey Klaus, Using Stout's `Optional` to represent the `optional` concept of a message in protobuf is definitely a step in the right direction. Regarding your comment in slack yesterday: From my version of the protobuf generated code there definitely is dynamic allocation even for scalars.