numloadthreads and threadcount: Which one to use where?

4 views
Skip to first unread message

arpit bansal

unread,
Feb 26, 2014, 2:04:03 PM2/26/14
to BG-Social...@googlegroups.com


Hello

Say we want to load the DB with 10 number of threads and we want to benchmark the DB with 100 number of threads. I am little bit confused about the runtime parameters. There are two parameters related to thread count: numloadthreads and threadcount.

The BG runtime parameter page have these descriptions for the above parameters:
numloadthreads - The number of threads used in the load phase per BG client.
threadcount - The simultaneous socialites emulating members issuing requests.

By looking at it, it seems that we should use numloadthreads=10 in load phase and threadcount=100 while benchmarking. I checked the exported file log and when I executed the load phase without providing the parameter threadcount, it had:
numloadthreads=10, threadcount=1

So could anyone clarify when to use which parameter?
Thanks.

Sumita Barahmand

unread,
Feb 26, 2014, 7:01:09 PM2/26/14
to BG-Social...@googlegroups.com
Hi,

In the load phase you need to use the "threadcount" parameter to specify the number of threads that should be used to load the data. This value should be decided such that it satisfies the following condition:
friendcountperuser < (usercount/threadcount)

This is because BG fragments the users into t clusters where t is the value specified for threadcount. And then it tries to generate friendships within each cluster. For example if we want to construct a social graph with 10 members where each member has 6 friends with threadcount=2,  each thread will load 5 members and will then try to generate 6 friends for each member in the 5 member cluster of its own which doesn't make sense.

When running the benchmark using the "-t" option the parameter "threadcount" is used to specify the number of threads issuing requests against the data store. At this stage BG also needs to be aware of the data loaded into the data store in order to issue meaningful results. For example it should issue a thawFriendship for two users that are already friends with one another. For this purpose BG should be aware of the social graph loaded into the data store. This is done using the following parameters:
initapproach=deterministic
numloadthreads
friendcountperuser
resourcecountperuser
useroffset=0
usercount

Where the numloadthreads should be set to the value t specified in the load phase.
To cut a long story short, if you set threadcount=t in the load phase, in the benchmarking phase you should set numloadthreads=t.and the use threadcount=s to emulate s threads issuing actions against the data store.

Sumita
Reply all
Reply to author
Forward
0 new messages