[ROOT-7423] Activating prefetching makes TTree iteration slower when reading through HTTP Created: 19/Jun/15  Updated: 15/May/19  Resolved: 08/Oct/15

Status: Closed
Project: ROOT
Component/s: TTree
Affects Version/s: 6.06/00
Fix Version/s: 6.06/00, 6.02/14, 6.04/04

Type: Bug Priority: High
Reporter: Enric Tejedor Saavedra Assignee: David Smith
Resolution: Fixed Votes: 0
Labels: None
Environment:

SLC6


Attachments: Text File test_prefetching.cxx    
Development:

 Description   

The attached code iterates over the entries of a TTree that is stored in a remote file, accessed through HTTP. The program receives a parameter that indicates whether prefetching should be enabled or not.

When running the program, I see two different behaviours:
1. Prefetching disabled: when running tree->GetEntry(0), the program waits for ~100 seconds for the cache to be filled. After that, ~100 entries are served quickly from the cache. Then, the program waits again for ~100 seconds, repeating the same pattern.
2. Prefetching enabled: when running tree->GetEntry(0), the program waits for ~100 seconds for the cache to be filled. After that, ~100 entries are served quickly from the cache. From this point on, each entry takes between 4 and 7 seconds to be served.

Therefore, the program takes longer to run with prefetching than without.



 Comments   
Comment by David Smith [ 15/Sep/15 ]

I've made and added a fix for the problem on master and 6.05 development branch; but Elvin (the original author of the prefetching) would also like to check some things. We'll add the fix to the other branches (and close the ticket) once I've given Elvin the chance to look, probably next week.

Comment by David Smith [ 02/Oct/15 ]

Added fix to the v6-02-00-patches (for 6-02-14), v6-04-00-patches (for 6-04-04) and v5-34-00-patches (for 5-34-36).

Comment by David Smith [ 08/Oct/15 ]

changed status to fixed

Generated at Wed Sep 18 15:49:32 CEST 2019 using Jira 7.13.1#713001-sha1:5e06076c2d215a6f699b7e5c90ab2fae7ba5a1ce.