Advertisement

Automatic Prefetching by Traversal Profiling in Object Persistence Architectures

  • Ali Ibrahim
  • William R. Cook
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4067)

Abstract

Object persistence architectures support transparent access to persistent objects. For efficiency, many of these architectures support queries that can prefetch associated objects as part of the query result. While specifying prefetch manually in a query can significantly improve performance, correct prefetch specifications are difficult to determine and maintain, especially in modular programs. Incorrect prefetching is difficult to detect, because prefetch is only an optimization hint. This paper presents AutoFetch, a technique for automatically generating prefetch specifications using traversal profiling in object persistence architectures. AutoFetch generates prefetch specifications based on previous executions of similar queries. In contrast to previous work, AutoFetch can fetch arbitrary traversal patterns and can execute the optimal number of queries. AutoFetch has been implemented as an extension of Hibernate. We demonstrate that AutoFetch improves performance of traversals in the OO7 benchmark and can automatically predict prefetches that are equivalent to hand-coded queries, while supporting more modular program designs.

Keywords

Query Result Related Object Access Pattern Query Execution Type Graph 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Atkinson, M.P., Buneman, O.P.: Types and persistence in database programming languages. ACM Comput. Surv. 19(2), 105–170 (1987)CrossRefGoogle Scholar
  2. 2.
    Atkinson, M.P., Daynes, L., Jordan, M.J., Printezis, T., Spence, S.: An orthogonally persistent Java. SIGMOD Record 25(4), 68–75 (1996)CrossRefGoogle Scholar
  3. 3.
    Ball, T., Larus, J.R.: Efficient path profiling. In: International Symposium on Microarchitecture, pp. 46–57 (1996)Google Scholar
  4. 4.
    Bernstein, P.A., Pal, S., Shutt, D.: Context-based prefetch for implementing objects on relations. In: Proceedings of the 25th VLDB Conference (1999)Google Scholar
  5. 5.
    Carey, M.J., DeWitt, D.J., Naughton, J.F.: The 007 benchmark. SIGMOD Rec. 22(2), 12–21 (1993)CrossRefGoogle Scholar
  6. 6.
    Cengija, D.: Hibernate your data. onJava.com (2004)Google Scholar
  7. 7.
    Cook, W.R., Rai, S.: Safe query objects: statically typed objects as remotely executable queries. In: ICSE 2005: Proceedings of the 27th international conference on Software engineering, pp. 97–106. ACM Press, New York (2005)CrossRefGoogle Scholar
  8. 8.
    Copeland, G., Maier, D.: Making Smalltalk a database system. In: Proceedings of the 1984 ACM SIGMOD international conference on Management of data, pp. 316–325. ACM Press, New York (1984)CrossRefGoogle Scholar
  9. 9.
    Curewitz, K.M., Krishnan, P., Vitter, J.S.: Practical prefetching via data compression. In: Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data (SIGMOD 1993) (1993)Google Scholar
  10. 10.
    Dub, J.-A., Sapir, R., Purich, P.: Oracle Application Server TopLink application developer’s guide, 10g (9.0.4). Oracle Corporation (2003)Google Scholar
  11. 11.
    Fisher, J.A., Freudenberger, S.M.: Predicting conditional branch directions from previous runs of a program. In: ASPLOS-V: Proceedings of the fifth international conference on Architectural support for programming languages and operating systems, pp. 85–95. ACM Press, New York (1992)CrossRefGoogle Scholar
  12. 12.
    Hamilton, G., Cattell, R.: JDBCTM: A Java SQL API. Sun Microsystems (1997)Google Scholar
  13. 13.
    Han, W.-S., Moon, Y.-S., Whang, K.-Y.: PrefetchGuide: capturing navigational access patterns for prefetching in client/server object-oriented/object-relational DBMSs. Information Sciences 152(1), 47–61 (2003)CrossRefGoogle Scholar
  14. 14.
    Han, W.-S., Moon, Y.-S., Whang, K.-Y., Song, I.-Y.: Prefetching based on type-level access pattern in object-relational DBMSs. In: Proceedings of the 17th International Conference on Data Engineering, pp. 651–660. IEEE Computer Society Press, Los Alamitos (2001)Google Scholar
  15. 15.
    ISO/IEC. Information technology - database languages - SQL - part 3: Call-level interface (SQL/CLI). Technical Report 9075-3:2003, ISO/IEC (2003)Google Scholar
  16. 16.
    Knafla, N.: Analysing object relationships to predict page access for prefetching. In: Eighth International Workshop on Persistent Object Systems: Design, Implementation and Use, POS-8 (1998)Google Scholar
  17. 17.
    Lamb, C., Landis, G., Orenstein, J.A., Weinreb, D.: The ObjectStore database system. Commun. ACM 34(10), 50–63 (1991)CrossRefGoogle Scholar
  18. 18.
    Lieberherr, K.J., Patt-Shamir, B., Orleans, D.: Traversals of object structures: Specification and efficient implementation. ACM Trans. Program. Lang. Syst. 26(2), 370–412 (2004)CrossRefGoogle Scholar
  19. 19.
    Liskov, B., Adya, A., Castro, M., Ghemawat, S., Gruber, R., Maheshwari, U., Myers, A.C., Day, M., Shrira, L.: Safe and efficient sharing of persistent objects in Thor. In: Proceedings of the 1996 ACM SIGMOD international conference on Management of data, pp. 318–329. ACM Press, New York (1996)CrossRefGoogle Scholar
  20. 20.
    Luk, C.-K., Mowry, T.C.: Compiler-based prefetching for recursive data structures. Architectural Support for Programming Languages and Operating Systems, 222–233 (1996)Google Scholar
  21. 21.
    Maier, D., Stein, J., Otis, A., Purdy, A.: Developments of an object-oriented DBMS. In: Proc. of ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications, pp. 472–482 (1986)Google Scholar
  22. 22.
    Marquez, A., Blackburn, S., Mercer, G., Zigman, J.N.: Implementing orthogonally persistent Java. In: Proceedings of the Workshop on Persistent Object Systems (POS) (2000)Google Scholar
  23. 23.
    Martin, B.E.: Uncovering database access optimizations in the middle tier with TORPEDO. In: Proceedings of the 21st International Conference on Data Engineering, pp. 916–926. IEEE Computer Society Press, Los Alamitos (2005)Google Scholar
  24. 24.
    Matena, V., Hapner, M.: Enterprise Java Beans Specification 1.0. Sun Microsystems (1998)Google Scholar
  25. 25.
    Morrison, R., Connor, R., Kirby, G., Munro, D., Atkinson, M., Cutts, Q., Brown, A., Dearle, A.: The Napier88 persistent programming language and environment. In: Fully Integrated Data Environments, pp. 98–154. Springer, Heidelberg (1999)Google Scholar
  26. 26.
    Palmer, M., Zdonik, S.B.: Fido: A cache that learns to fetch. In: Proceedings of the 17th International Conference on Very Large Data Bases (1991)Google Scholar
  27. 27.
    Patterson, D.A.: Latency lags bandwith. Commun. ACM 47(10), 71–75 (2004)CrossRefMathSciNetGoogle Scholar
  28. 28.
    Russell, C.: Java Data Objects (JDO) Specification JSR-12. Sun Microsystems (2003)Google Scholar
  29. 29.
    Raible’s wiki: StrutsResume (March 2006), http://raibledesigns.com/wiki/Wiki.jsp?page=StrutsResume
  30. 30.
    Venkatrao, M., Pizzo, M.: SQL/CLI – a new binding style for SQL. SIGMOD Record 24(4), 72–77 (1995)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Ali Ibrahim
    • 1
  • William R. Cook
    • 1
  1. 1.Department of Computer SciencesUniversity of Texas at Austin 

Personalised recommendations