Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow strategy for dempsy to configure out how many logical threads it can alloc to output pool #54

Closed
bill-tuba opened this issue Aug 27, 2012 · 3 comments

Comments

@bill-tuba
Copy link

This does not take into account for hyper threading

It would be nice if DEMPSY could grab as many threads as "it should" when started up on a box.

Right now we can override this directly which is nice but can DEMPSY 'respond' itself to what's available?

So we have this ....

<bean id="myParallelizedOutputExecutor" class="com.nokia.dempsy.output.RelativeOutputSchedule">
    <constructor-arg value="${output.frequency}"/>
    <constructor-arg value="MINUTES"/>
    <property name="concurrency" value="10"/>
</bean>

Could we inject a strategy to have the box help us out?

    <bean id="myParallelizedOutputExecutor" class="com.nokia.dempsy.output.RelativeOutputSchedule">
        <constructor-arg value="${output.frequency}"/>
        <constructor-arg value="MINUTES"/>
        <property name="concurrencyStrategy" ref="findMeSomeThreads"/>
    </bean>


<bead id="findMeSomeThreads" class "MachineBasedAllocationStrategy" >
              <property name="machineHint" value="HYPER_THREADED"
                 <!-- helps us NOT eat up the whole box and choke...-->
</bean>


<bead id="findMeSomeThreads" class "WeightedThreadAllocationStrategy" >
              <property name="relativeWeight" value="0.7" />
               <!-- distribute  the # of threads ACROSS pools ...-->
</bean>


# The above is just some observations  -- perhaps the strategies form a compound / decorated kind of configuration.
@bill-tuba
Copy link
Author

This is more of an enhancement - not an "issue" per-se

@jimfcarroll
Copy link
Collaborator

Ok Bill. I changed it to an "enhancement."

@jimfcarroll
Copy link
Collaborator

For now I'm going to leave this since the output loop works in conjunction with the threading model but uses it's own thread pool so there's no good way to do this except to borrow threads from the main threading model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants