• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Control DB perfomance separately for two application threads

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I run a Web application that constantly imports data to my DB. This import thread brings lots of reads and writes to my DB. The same Web application sends user requests (user search queries from a website) to the DB.

Problem: user requests get slower due to reads and writes to the DB by the import thread.

I wonder if I could assign a certain limit of e.g. JDBC maxThreads for each of the processes to control the performance for both processes separately. For example, does it make sense to configure two JDBC resources (connecting to the same DB) with limited maxThreads set for the import process to keep DB performance for the user requests?

Thanks for any input on this!
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you considered a caching mechanism where database writes are delayed and centralized to a single thread?
 
Lukas Benberg
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Scott,
this is probably sort of the thing I had in mind. I didn't work a lot with JDBC yet, so the question for me is *how* to I centralize part of my writes to one DB thread. Is it done by putting them on a single application thread (i.e. a Class that extends Thread)?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic