This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Control DB perfomance separately for two application threads

 
Lukas Benberg
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • 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!
 
Scott Selikoff
author
Saloon Keeper
Posts: 4008
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • 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
  • 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)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic