[
https://issues.apache.org/jira/browse/GEODE-6148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718262#comment-16718262
]
ASF GitHub Bot commented on GEODE-6148:
---------------------------------------
balesh2 commented on a change in pull request #25: GEODE-6148: improve
performance of Prepopulate
URL: https://github.com/apache/geode-benchmarks/pull/25#discussion_r240842920
##########
File path:
geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegion.java
##########
@@ -50,14 +56,36 @@ public PrePopulateRegion(long keyRangeToPrepopulate) {
public void run(TestContext context) {
Cache serverCache = (Cache) context.getAttribute("SERVER_CACHE");
Region region = serverCache.getRegion("region");
+
+ int numLocators = context.getHostsForRole(LOCATOR).size();
+ int numServers = context.getHostsForRole(SERVER).size();
+ int serverIndex = context.getJvmID() - numLocators;
+ int numPutsPerServer = (int) this.keyRangeToPrepopulate / numServers;
+
+ AtomicInteger lowBound = new AtomicInteger();
Review comment:
It is used in a lambda so it has to be effectively final
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Improve the efficiency of PrePopulateRegion and increase the key range
> ----------------------------------------------------------------------
>
> Key: GEODE-6148
> URL: https://issues.apache.org/jira/browse/GEODE-6148
> Project: Geode
> Issue Type: Improvement
> Components: benchmarks
> Reporter: Dan Smith
> Assignee: Helena Bales
> Priority: Major
> Labels: pull-request-available
>
> We are currently running with a keyRange of 1000, which may be skewing our
> results. We want to run with a much larger key range, which means
> prepopulating more data.
> The PrePopulateRegion task could be much faster if we take some of these
> steps:
> * Stop duplicating work - right now each server will put the entire key
> range, resulting in duplicate puts of the same keys
> * use multiple threads - each server populating the region could be using
> multiple threads to populate it faster. One option would be to use a
> parallelStream, there may be better choicse.
> * Use putAlls - putAlls in batches require fewer round trips than puts.
> Acceptance:
> * All benchmarks can finish their prepopulation step in 30 seconds or less on
> reasonable hardware.
> * We set a fixed key range that is somewhere between 100 thousand and 100
> million, whatever is most reasonable.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)