How to configure the database instance to respond slowly for any request?

455 pts.
Tags:
Database configuration
Database instance
Database testing
DB2
Oracle
SQL Database
SQL Query
SQL Server
With default configuration settings at DB instance, the db server is responding quick. For my tests, i want the db server response to be slow. What configuration changes or anything else can be done so that the db instance will respond slowly (atleast take 1 minute time to execute). The request can be connect to db, list applications, stop, start, query, etc
ASKED: December 16, 2008  7:24 AM
UPDATED: December 24, 2008  6:17 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can try starving the system of memory. Set the database server to only have access to a few megs of memory. This should make the system very unresponsive.

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Saimadhu
    Hmm if i change the configuration at the DB server level, then other instances also will be affected. I do not want other users who is using the different instances on the same DBserver to be affected. I want to make only my db instance to respond slowly. Is this possible?
    455 pointsBadges:
    report
  • Denny Cherry
    Changing the memory available is done at an instance level, so other instances wouldn't be effected by the memory change. However they would be effected by the increased CPU usage. This should only be done in a development system as others on the server will be impacted. What is the end result that you are trying to get. Most everyone else tunes the server to increase speed not decrease it.
    65,450 pointsBadges:
    report
  • Saimadhu
    FYI, Changing the memory available at instance level is not making the DB to respond slowly. Even when DB memory is fully used, the DB's response is not slow. My produt server is able to connect to the DB server and do transactions. In return i am getting an SQL error saying memory is full. Why i need my DB m/c to respond slowly ? As part of break testing, i am trying to see how my product server behaves (whether it time outs or waits indefinitely, etc) when other interrelated components like DB server behaves unexpectedly (like accept connection request but doesn't respond for some time). Also, what happens if we interrupt (using any signal) the product server while waiting for the db server response.
    455 pointsBadges:
    report
  • Denny Cherry
    I did say "should". Depending on what platform you are using, the servers will respond differently. As you listed SQL Server, Oracle and DB2 in the tags and you haven't clarified what platform you are using, I still have no idea which system you are using. What is the end result that you are trying to get?
    65,450 pointsBadges:
    report
  • Saimadhu
    I should have mentioned details clearly. I am using DB2 at present. In future i will be using SQL server, Oracle also for break testing. The end result is to check whether my product server behaves gracefully when DB2 response to the product server is very slow, etc (any unexpected behavior). FYI, this all started when my DB2 suddenly went into unexpected state (accepts connection from the server but doesn't respond for some time , later it is not responding indefinitely ). At this point of times we have some observations in our product server which will be fixed. To verify the fixes i need to get the fresh DB instance into such state again. So, i want to understand in what circumstances DB will respond slowly ? :)
    455 pointsBadges:
    report
  • Kccrosser
    A couple of possible ideas. First - if your application server is separate from your database server, you could try throttling the communications between them. Purchase a pair of programmable-speed routers, install them between your app server and the rest of the network, and program them for very slow communications (e.g., 9600 bps). To further slow it down, you can saturate the channel capacity by having some concurrent jobs doing large FTP or other file transfers. This will work with any database, but may not get you sufficient response delays if you are looking for multiple-minute responses. Also, these routers aren't real cheap. Second - assuming that your application is trying to access one or more common tables (and you "own" these tables for testing purposes!!!), just create a second application/process that issues a "select for update" against one or more of the common tables and then sleeps for a period of time. Implementation suggestions; 1. Create a control table that contains a single record 2. The "blocking" process writes a "1" into the table (and COMMITS!) 3. The "blocking" process then loops while that record contains a "1" 4. The "blocking" process selects against one or more of the common tables with a "select ... for update" 5. The "blocking" process sleeps for a while 6. The "blocking" process issues a Rollback to release the tables (and let the other transactions get through, finally) 7. Repeat until the control table doesn't have a "1" in the control record You can then stop the blocker with a side process (or simple SQL statement) that deletes the control record (or writes a "0"), etc. Note that this implies your application is running with at least a READ COMMITTED isolation level. If your application allows "dirty reads", it may not block on the "select ... for update" transaction. Again, subject to making sure the isolation level is set to READ COMMITTED or higher, this should work regardless of which database platform you are using. NOTE - while this will not impact other users/CPU usage on your database server, if there are other applications sharing those table(s), they will obviously be affected.
    3,830 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following