Li Yi
SCISM
South Bank University
08 December 1999
Contents
Testing Plan
1. Components of a C/S Test
1.1 The Server
1.2 The Client
1.3 The Network
2. Prepared Tests
2.1 Basic Tests
2.2 ASP Tests
2.3 Web Database Tests
3. Configuration for the tests
3.1 Server Memory
3.2 Network Conditions
3.3 Number of Clients
4. Single Table Queries
1. 2a. 2b. 2c. 2d. 3. 4a. 4b. 4c. 4d. 5. 6a. 6aa. 6ab. 6ac. 6b. 6ba. 6bb. 6bc. 6c. 6ca.
6cb. 6d. 6da. 6db. 7. 8. 9.
5. Join Table Queries
6. Performance monitor
The tests simulate the activity of a Web server and its many client Web browsers' communication across one network.
A test involves three primary subsystems: a server, a client, and the network. During a test, a client run a virtual client program and the server responds with the result files. This section describes these components and the programs they run.
Figure 1 shows the pieces involved in a single-network test.
The server is typically an IBM-compatible PC with Internet Information Services, SQL Server 6.5, and Windows NT 4.0 Server. The server uses sets of prepared sample ASP pages and sample databases, which simulate those that a server might provide to its clients. The prepared ASP pages and databases simulate Web databases of varying lengths.
The server performance is investigated by a broad spectrum of client demands. Alternatively, the test may be repeatedly run the same prepared test, before and after hardware and software changes, provided this choice is available.
In a test, the server:
The specification of the server is:
The client consists of a computer running a client application (see the attached program file). The client application certainly can be run on more than one client computer.
The client application runs in a single, multithreaded process. Each thread in the process represents a virtual client. Each virtual client makes one connection and page request to the server at a time. This design enables each client computer to simulate more than one client.
If a client is using more than the total amount of physical memory it has available by running a large number of virtual clients, the resulting use of virtual memory reduces the speed at which it can send requests. The number of virtual clients the computer supports should be scaled back until it is using only physical memory.
The specification of client is:
In a test, the tester specify what level of client demand the server is subject to, including:
The client application initiates by using an input file described in the following section. When the test is over, the application writes the test results into an output file.
The Input file
The input file is a text file, which is stored on the client computer. It specifies the number of virtual clients that will run. The request pages and the request rate are specified also. For a sample the input file, see the attached file.
The Output file
The testing results are recorded in the output file, including the time of sending request, the time of receiving request, and the database server running time. The sample is shown at the attached file.
In this plan, the network refers to the communication links between the client computers, and the server computer during a test. It is a 10Mbps Ethernet network connecting by a hub.
There are three types of tests:
ASP applications are programs that produce dynamic web pages. The tests use a set of eight files: App.asp, Session.asp, QueryStr.asp, Form.asp, Hello.asp, Fibo.asp, Sessid.asp, and Server.asp.
Since ASP has session function, cookies are useful. If a virtual client sends a series of requests to an ASP file and cookies are turned off, then ASP has to create a new session object for each request. This causes increased overhead on the server. If cookies are turned on, ASP can reuse the session, as it does with actual browsers; when the client requests an ASP file, the server puts the session ID into a cookie and sends it to the client. The client stores the cookie and sends it with any subsequent requests to the server.
The test should consider the functions of cache, so that some data is being read from disc rather than from cache. For the purposes of clarity some tests assume the table in question is in the cache.
All tests to be carried out on the tables, which fit on one disc. For all tests a 30k table with a large (2 kilobytes) tuple length will be used as well as a table with a short (50 byte) tuple length. This is to check how the size of tuple effects.
3. Configuration for the tests
The tests are suggested to be repeated several different tests under different conditions. Vary the speed and number of processors (if available), the amount of physical memory, the available hard disk space and disk configuration, and network bandwidth and traffic.
Make sure that the system has sufficient memory for the tests. It is recommended that the Server computer should have enough physical memory to contain all static content pages involved in the test simultaneously.
A network with limited bandwidth or substantial traffic can limit the performance of the server. The ideal network condition (100Mbps isolated network) is suggested and it is not a factor in the test.
IIS Bandwidth Throttler can be used to change the bandwidth available to Internet Information Services, if different network conditions are to be simulated.
The number of virtual clients in the test should be varied to simulate different conditions.
Looking for the cost of scanning the whole table by checking a non-key attribute and returning no tuple.
SELECT *
FROM ta30
WHERE entier < -5,000,000,000
T1 = 30k*Tscan + 30k*Tlarge
Looking for the cost of scanning the whole table by checking the key attribute and returning no tuple.
SELECT *
FROM ta30
WHERE cle < 0
T2a = 30k*Tscan + 30k*Tsmall
Looking for the cost of scanning the whole table by checking the key attribute twice and returning no tuple.
SELECT *
FROM ta30
WHERE cle < 0 OR cle>9,999,999,999
T2b = 30k*Tscan + 30k*Tsmall + 30k*Tlarge
Looking for the cost of scanning the whole table by checking the key and a non-key attribute and returning no tuple.
SELECT *
FROM ta30
WHERE cle < 0 OR entier<-5,000,000,000
T2c = 30k*Tscan + 30k*Tsmall + 30k*Tlarge
Checking that the order of the predicates. It does not matter.
SELECT *
FROM ta30
WHERE entier<-5,000,000,000 OR cle < 0
T2d = 30k*Tscan + 30k*Tsmall + 30k*Tlarge
Looking for the cost of a scan. Checking two non-key predicates and returning no tuple.
SELECT *
FROM ta30
WHERE entier<-5,000,000,000 OR signe < 0
T3 = 30k*Tscan + 30k*Tsmall + 30k*Tlarge
Tlarge = T3 - T2 , Tscan = T2 - Tlarge , Tsmall = T3 - T1
Looking for the cost of returning 30000 result tuples locally.
SELECT *
FROM ta30
WHERE entier>-5,000,000,000
T4a = 30k*Tscan + 30k*Tlarge + 30k*Treturn
(I doubt the success of returning so many tuples.)
Looking for the cost of returning one tuple locally and an equality check.
SELECT *
FROM ta30
WHERE entier = 888888888
T4b = 30k*Tscan + 30k*Tsmall-equal + 1*Treturn
Looking for the cost of returning one tuple locally and an equality check.
SELECT *
FROM ta30
WHERE entier = 111111
T4c = 30k*Tscan + 30k*Tsmall-equal + 1*Treturn
Looking for the cost of returning one result tuple locally and an inequality check.
SELECT *
FROM ta30
WHERE entier < 111111
T4d = 30k*Tscan + 30k*Tsmall + 1*Treturn
Looking for the cost of checking a string
SELECT *
FROM ta30
WHERE jour = 29-10-34
T5 = 30k*Tscan + 30k*8*Tsmall + 1*Treturn
Looking for the cost of max aggregation.
SELECT max(entier)
FROM ta30
WHERE cle < 0
T6a = 30k*Tscan + 30k*Tsmall + 1*Tagg + 1*Treturn
agg is a max or a min aggregation swap, which involves swapping the current value for the most recently scanned, this value is assumed to be fifty percent of all tuples as the table is created with random values.
Looking for the cost of the max aggregation.
SELECT max(entier)
FROM ta30
WHERE cle > 0
T6aa = 30k*Tscan + 30k*Tsmall + 30k*Tscan + 30k*Tsmall + 15k*Tswap + 1*Treturn
Looking for the cost of the max aggregation.
SELECT max(entier)
FROM ta30
WHERE entier > -5000000000
T6ab = 30k*Tscan + 30k*Tsmall + 30k*Tscan + 30k*Tsmall + 15k*Tswap + 1*Treturn
Looking for the cost of the max aggregation.
SELECT max(entier)
FROM ta30
WHERE entier > Y
T6ac = 30k*Tscan + 30k*Tsmall + Y*Tscan + Y*Tsmall + Z*Tswap + 1*Treturn
Where Y will be a number of tuples passing the check and Z is the number of swaps, which will be carried out.
Looking for the cost of the min aggregation.
SELECT min(entier)
FROM ta30
WHERE cle < 0
T6b = 30k*Tscan + 30k*Tsmall + 1*Tagg + 1*Treturn
agg is a max or a min aggregation swap, which involves swapping the current value for the most recently scanned, this value is assumed to be fifty percent of all tuples as the table is created with random values.
Looking for the cost of the min aggregation.
SELECT min(entier)
FROM ta30
WHERE cle > 0
T6ba = 30k*Tscan + 30k*Tsmall + 30k*Tscan + 30k*Tsmall + 15k*Tswap + 1*Treturn
Looking for the cost of the min aggregation.
SELECT min(entier)
FROM ta30
WHERE entier > -5000000000
T6bb = 30k*Tscan + 30k*Tlarge + 30k*Tscan + 30k*Tsmall + 15k*Tswap + 1*Treturn
Looking for the cost of the min aggregation.
SELECT min(entier)
FROM ta30
WHERE entier > Y
T6bc = 30k*Tscan + 30k*Tsmall + Y*Tscan + Y*Tsmall + Z*Tswap + 1*Treturn
Where Y will be a number of tuples passing the check and Z is the number of swaps, which will be carried out.
Looking for the cost of the sum aggregation.
SELECT sum(entier)
FROM ta30
WHERE cle < 0
T6c = 30k*Tscan + 30k*Tsmall + 1*Tsum + 1*Treturn
Looking for the cost of the sum aggregation.
SELECT sum(entier)
FROM ta30
WHERE cle > 0
T6ca = 30k*Tscan + 30k*Tsmall + 30k*Tsum + 1*Treturn
Looking for the cost of the sum aggregation.
SELECT sum(entier)
FROM ta30
WHERE entier > -5000000000
T6cb = 30k*Tscan + 30k*Tlarge + 30k*Tsum + 1*Treturn
Looking for the cost of the avg aggregation.
SELECT avg(entier)
FROM ta30
WHERE cle < 0
T6d = 30k*Tscan + 30k*Tsmall + 1*Tavg + 1*Treturn
Looking for the cost of the avg aggregation.
SELECT avg(entier)
FROM ta30
WHERE cle > 0
T6da = 30k*Tscan + 30k*Tsmall + 30k*Tavg + 1*Treturn
Looking for the cost of the avg aggregation.
SELECT sum(entier)
FROM ta30
WHERE entier > -5000000000
T6db = 30k*Tscan + 30k*Tlarge + 30k*Tavg + 1*Treturn
Looking for the cost of the grouping.
SELECT max(name)
FROM ta30
WHERE cle < 5000000000
GROUP BY signe
T7 = 30k*Tscan + 30k*Tlarge + 10*3k*Tgroup + 10*3k*Tagg + 10*Treturn
Looking for the cost of the sorting.
SELECT *
FROM ta30
WHERE cle < 5000000000
ORDER BY cle
T8 = 30k*Tscan + 30k*Tlarge + 30k*Tsort + 30k*Treturn
Confirming the cost of the sorting.
SELECT *
FROM ta30
WHERE signe < 6
ORDER BY cle
T9 = 30k*Tscan + 30k*Tlarge + 15k*Tsort + 15k*Treturn
8. Multi-user Tests
In order to generate a representative WWW workload, WebStone or TPC/W should be considered. The problem is how to customise the standard benchmark to the Web database requests.
Throughput or response time versus number of client
The following two kinds of tests should be carried out.
1. To fix the set of workload, and vary the number of clients concurrently accessing the server.
2. To fix the number of clients accessing the server and vary the workload.