ldbc / ldbc_snb_interactive_v1_driver

Driver for the LDBC SNB Interactive workload
https://ldbcouncil.org/benchmarks/snb-interactive
Apache License 2.0
19 stars 35 forks source link

Short reads random walk dissipation rate set to 0, causes constant spin on LdbcShortQuery<query number>Factory.create #114

Open filipecosta90 opened 4 years ago

filipecosta90 commented 4 years ago

issue details

setting the ldbc.snb.interactive.short_read_dissipation to 0, in order to enforce only short read queries causes a constant spin on LdbcShortQueryFactory.create, forcing the following clause to be always false( we're using an the exclusive upper bound of 1 ) :

double coinToss = random.nextUniform( min, max );
            if ( state > coinToss )
            {
                return innerFactory.create(
                        personIdBuffer,
                        messageIdBuffer,
                        previousOperation,
                        previousOperationActualStartTimeAsMilli,
                        previousOperationRunDurationAsNano,
                        state
                );
            }
            else
            { return null; }

causing the following stack trace to be what's topping up the CPU:

com.ldbc.driver.workloads.ldbc.snb.interactive.LdbcSnbShortReadGenerator$LdbcShortQuery1Factory.create
com.ldbc.driver.workloads.ldbc.snb.interactive.LdbcSnbShortReadGenerator$CoinTossingFactory.create
com.ldbc.driver.workloads.ldbc.snb.interactive.LdbcSnbShortReadGenerator.nextOperation
com.ldbc.driver.WorkloadStreams.fromAmongAllRetrieveTopCountFromOffset
com.ldbc.driver.WorkloadStreams.createNewWorkloadWithOffsetAndLimitedWorkloadStreams
com.ldbc.driver.WorkloadStreams.createNewWorkloadWithOffsetAndLimitedWorkloadStreams
com.ldbc.driver.client.ExecuteWorkloadMode.doInit
com.ldbc.driver.client.ExecuteWorkloadMode.startExecutionAndAwaitCompletion
com.ldbc.driver.Client.main

we should test for fuzzy equality in order to fix this bug. What do you guys think?

used properties

ExecuteWorkloadMode  Driver Configuration
ExecuteWorkloadMode  Workload Start Time:       2019-12-27 - 17:20:44.552
Parameters:
        Name:                           LDBC-SNB
        DB:     (....)
        Workload:                       com.ldbc.driver.workloads.ldbc.snb.interactive.LdbcSnbInteractiveWorkload
        Operation Count:                1
        Warmup Count:                   0
        Skip Count:                     0
        Worker Threads:                 1
        Status Display Interval:        00:01.000 (m:s.ms)
        Time Unit:                      MILLISECONDS
        Results Directory:  (....)
        Time Compression Ratio:         0.0010000
        Validation Creation Params:     null
        Database Validation File:       null
        Calculate Workload Statistics:  false
        Spinner Sleep Duration:         00:00.000 (m:s.ms) / 0 (ms)
        Print Help:                     false
        Ignore Scheduled Start Times:   false
        User-defined parameters:

                ldbc.snb.interactive.LdbcQuery10_enable = false
                ldbc.snb.interactive.LdbcQuery10_freq = 0
                ldbc.snb.interactive.LdbcQuery11_enable = false
                ldbc.snb.interactive.LdbcQuery11_freq = 0
                ldbc.snb.interactive.LdbcQuery12_enable = false
                ldbc.snb.interactive.LdbcQuery12_freq = 0
                ldbc.snb.interactive.LdbcQuery13_enable = false
                ldbc.snb.interactive.LdbcQuery13_freq = 0
                ldbc.snb.interactive.LdbcQuery14_enable = false
                ldbc.snb.interactive.LdbcQuery14_freq = 0
                ldbc.snb.interactive.LdbcQuery1_enable = true
                ldbc.snb.interactive.LdbcQuery1_freq = 1
                ldbc.snb.interactive.LdbcQuery2_enable = false
                ldbc.snb.interactive.LdbcQuery2_freq = 0
                ldbc.snb.interactive.LdbcQuery3_enable = false
                ldbc.snb.interactive.LdbcQuery3_freq = 0
                ldbc.snb.interactive.LdbcQuery4_enable = false
                ldbc.snb.interactive.LdbcQuery4_freq = 0
                ldbc.snb.interactive.LdbcQuery5_enable = false
                ldbc.snb.interactive.LdbcQuery5_freq = 0
                ldbc.snb.interactive.LdbcQuery6_enable = false
                ldbc.snb.interactive.LdbcQuery6_freq = 0
                ldbc.snb.interactive.LdbcQuery7_enable = false
                ldbc.snb.interactive.LdbcQuery7_freq = 0
                ldbc.snb.interactive.LdbcQuery8_enable = false
                ldbc.snb.interactive.LdbcQuery8_freq = 0
                ldbc.snb.interactive.LdbcQuery9_enable = false
                ldbc.snb.interactive.LdbcQuery9_freq = 0
                ldbc.snb.interactive.LdbcShortQuery1PersonProfile_enable = true
                ldbc.snb.interactive.LdbcShortQuery2PersonPosts_enable = false
                ldbc.snb.interactive.LdbcShortQuery3PersonFriends_enable = false
                ldbc.snb.interactive.LdbcShortQuery4MessageContent_enable = false
                ldbc.snb.interactive.LdbcShortQuery5MessageCreator_enable = false
                ldbc.snb.interactive.LdbcShortQuery6MessageForum_enable = false
                ldbc.snb.interactive.LdbcShortQuery7MessageReplies_enable = false
                ldbc.snb.interactive.LdbcUpdate1AddPerson_enable = false
                ldbc.snb.interactive.LdbcUpdate2AddPostLike_enable = false
                ldbc.snb.interactive.LdbcUpdate3AddCommentLike_enable = false
                ldbc.snb.interactive.LdbcUpdate4AddForum_enable = false
                ldbc.snb.interactive.LdbcUpdate5AddForumMembership_enable = false
                ldbc.snb.interactive.LdbcUpdate6AddPost_enable = false
                ldbc.snb.interactive.LdbcUpdate7AddComment_enable = false
                ldbc.snb.interactive.LdbcUpdate8AddFriendship_enable = false
                ldbc.snb.interactive.parameters_dir = ../../ldbc_snb_datagen/substitution_parameters/
                ldbc.snb.interactive.short_read_dissipation = 0
                peer_identifiers = 
                printQueryNames = true
                printQueryResults = true
                printQueryStrings = true
                queryDir = queries/
                results_log = true

ExecuteWorkloadMode  
 ---------------------------------
 --- No Warmup Phase Requested ---
 ---------------------------------
ExecuteWorkloadMode  
 -----------------
 --- Run Phase ---
 -----------------
ExecuteWorkloadMode  Scanning workload streams to calculate their limits...
WorkloadStreams  Scanned 0 of 0 - OFFSET
szarnyasg commented 4 years ago

@filipecosta90 thanks for reporting this. This is indeed a problem, could you send a PR to patch it?

filipecosta90 commented 4 years ago

Sure :)

On Sat, Dec 28, 2019, 11:27 Gabor Szarnyas notifications@github.com wrote:

@filipecosta90 https://github.com/filipecosta90 thanks for reporting this. This is indeed a problem, could you send a PR to patch it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ldbc/ldbc_snb_driver/issues/114?email_source=notifications&email_token=ABMP3VIQNIM32ZTJ2HA5H5LQ24ZYPA5CNFSM4J77Q3D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYHYTI#issuecomment-569408589, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMP3VLXAKXJUUKEGYLWMK3Q24ZYPANCNFSM4J77Q3DQ .