It's all about the answers!

Ask a question

Why does RTC server become slow?


Change Vision (112) | asked Oct 27 '08, 10:27 p.m.
Hello, developer team,

We have been developping our product with jazz client library. We created the unit test for our product, so in some test cases, we need to create some work items to test server for the test data in test set-up method on JUnit.

We wrote code which creating a project area, creating some work items in setUp method. deleting project area in tearDown method.

Of course, we schedule CI in three times in a day(naturally-using RTC). But the elapsed time for running all tests increased steadily by execution. The test server been connected by test case, is restarted everyday.

We collected the follwoing elapse in a week, and analized that.

the elapse of a certain test method.

times ratio
--------- --------
first 1
second 1.5
third 2.5 - 6


Will you please tell me what we should do?

Best regards,

- Takeshi

6 answers



permanent link
Matt Lavin (2.7k2) | answered Oct 29 '08, 8:45 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Can you tell us a little more about what your tests are doing? When you
run your tests is the DB back at the same empty state?

In our build system, we typically start a new server for each testsuite
(to ensure consistent data). Do you have any server side extensions
that might be left running after each test pass?

Matt Lavin
Jazz Server Team


changevision wrote:
Hello, developer team,

We have been developping our product with jazz client library. We
created the unit test for our product, so in some test cases, we need
to create some work items to test server for the test data in test
set-up method on JUnit.

We wrote code which creating a project area, creating some work items
in setUp method. deleting project area in tearDown method.

Of course, we schedule CI in three times in a day(naturally-using
RTC). But the elapsed time for running all tests increased steadily
by execution. The test server been connected by test case, is
restarted everyday.

We collected the follwoing elapse in a week, and analized that.

the elapse of a certain test method.

times ratio
--------- --------
first 1
second 1.5
third 2.5 - 6


Will you please tell me what we should do

Best regards,

- Takeshi

permanent link
Change Vision (112) | answered Oct 31 '08, 2:46 a.m.
Thank you for replying.

Can you tell us a little more about what your tests are doing? When you
run your tests is the DB back at the same empty state?


We start a new server for each integration. And then we create new data for test in Junit setUp method, and delete them in JUnit tearDown method to ensure consistent data. The integration runs over 100 test cases.


For example(JUnit3.x)


protected void setUp() throws Exception {
createProjectArea(testProjectAreaName);
createWorkItem(testProjectAreaName, "Task 1 for test");
super.setUp();
}

protected void tearDown() throws Exception {
deleteProjectArea(testProjectAreaName);
super.tearDown();
}



The code of creation of project area,


private String createNewProjectAreaFromCopy(String baseProjectName, String projectName)
throws TeamRepositoryException, TeamOperationCanceledException {
IProjectArea projectArea = getProjectArea(baseProjectName);

IProjectArea area = processItemService.createProjectArea();
area.setName(projectName);
area.setProcessDefinition(projectArea.getProcessDefinition());
area.setProcessContentURL(projectArea.getProcessContentURL());
area.setProcessName(projectArea.getProcessName());
area.setProcessSummary(projectArea.getProcessSummary());

processItemService.save(area, null);
processItemService.initialize(area, null);
return projectName;
}



The code of creating work item,


IProjectArea projectArea = (IProjectArea) RepositoryServiceUtil.getProcessArea(projectAreaName, getTeamRepository());
ITeamAreaHandle teamHandle = getTeamAreaHandle(projectArea);
IIterationHandle itrHandle = RepositoryServiceUtil.getIterationHandle(getTeamRepository(), projectArea, "M1");

Identifier<IState> state = Identifier.create(IState.class, stateId);
IWorkItemType useType = getWorkItemType(typeName, projectArea);
ICategoryHandle categoryHandle = getCategoryHandle(teamHandle);

Identifier<IPriority> priorityIdentifier = null;
if (priorityString != null) {
priorityIdentifier = Identifier.create(IPriority.class, priorityString);
}

//Extending WorkItemOperation
WorkItemOperation op = new WorkItemCreatorImpl(
summaryName,
itrHandle,
categoryHandle,
state,
priorityIdentifier );
IContributorManager manager = getTeamRepository().contributorManager();
if (owner != null) {
IContributor contributor = manager.fetchContributorByUserId(owner, null);
assert contributor != null;
((WorkItemCreatorImpl)op).owner = contributor;
}

return op.run(useType, null);



The problem is similar to https://jazz.net/jazz/web/projects/Jazz%20Project#action=com.ibm.team.workitem.viewWorkItem&id=27855. But the defect had already fixed.

In our build system, we typically start a new server for each testsuite
(to ensure consistent data). Do you have any server side extensions
that might be left running after each test pass?


We have no server side extensions. We have been developing with only a client library.

The point of our question is that we'd like to remove the risk which our product using client library will have gotten slow while our product and RTC server is running. So we'd like to know what the cause of problem.

best regards,
-Takeshi

permanent link
Matt Lavin (2.7k2) | answered Oct 31 '08, 8:40 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
I can't see anything obvious that you are doing that is different from
what we normally do, or that would cause a slowdown like you are seeing.
We run lots of tests multiple times per day, and we see very
consistent times in the test runs.

Unfortunately, I think the best approach is to use some Java profiling
tools against the server to see what is slowing down the tests in your
specific environment.

To avoid doing the performance debugging yourself, perhaps you could
create a package that has a test script in it that runs in a loop and
demonstrates the slowdown with an out of the box RTC server install? If
you create such a thing, you could open a bug that helps us quickly
reproduce the problem you are seeing.

Matt Lavin
Jazz Server Team


changevision wrote:
Thank you for replying.

lavinmwrote:
Can you tell us a little more about what your tests are doing? When
you
run your tests is the DB back at the same empty state?


We start a new server for each integration. And then we create new
data for test in Junit setUp method, and delete them in JUnit
tearDown method to ensure consistent data. The integration runs over
100 test cases.


For example(JUnit3.x)


protected void setUp() throws Exception {
createProjectArea(testProjectAreaName);
createWorkItem(testProjectAreaName, "Task 1 for
test");
super.setUp();
}

protected void tearDown() throws Exception {
deleteProjectArea(testProjectAreaName);
super.tearDown();
}



The code of creation of project area,


private String createNewProjectAreaFromCopy(String
baseProjectName, String projectName)
throws TeamRepositoryException, TeamOperationCanceledException
{
IProjectArea projectArea = getProjectArea(baseProjectName);

IProjectArea area = processItemService.createProjectArea();
area.setName(projectName);
area.setProcessDefinition(projectArea.getProcessDefinition());
area.setProcessContentURL(projectArea.getProcessContentURL());
area.setProcessName(projectArea.getProcessName());
area.setProcessSummary(projectArea.getProcessSummary());

processItemService.save(area, null);
processItemService.initialize(area, null);
return projectName;
}



The code of creating work item,


IProjectArea projectArea = (IProjectArea)
RepositoryServiceUtil.getProcessArea(projectAreaName,
getTeamRepository());
ITeamAreaHandle teamHandle =
getTeamAreaHandle(projectArea);
IIterationHandle itrHandle =
RepositoryServiceUtil.getIterationHandle(getTeamRepository(),
projectArea, "M1");

Identifier<IState> state =
Identifier.create(IState.class, stateId);
IWorkItemType useType = getWorkItemType(typeName,
projectArea);
ICategoryHandle categoryHandle =
getCategoryHandle(teamHandle);

Identifier<IPriority> priorityIdentifier = null;
if (priorityString != null) {
priorityIdentifier =
Identifier.create(IPriority.class, priorityString);
}

//Extending WorkItemOperation
WorkItemOperation op = new WorkItemCreatorImpl(
summaryName,
itrHandle,
categoryHandle,
state,
priorityIdentifier );
IContributorManager manager =
getTeamRepository().contributorManager();
if (owner != null) {
IContributor contributor =
manager.fetchContributorByUserId(owner, null);
assert contributor != null;
((WorkItemCreatorImpl)op).owner =
contributor;
}

return op.run(useType, null);



The problem is similar to
https://jazz.net/jazz/web/projects/Jazz%20Project#action=com.ibm.team.workitem.viewWorkItem&id=27855.
But the defect had already fixed.

lavinmwrote:
In our build system, we typically start a new server for each
testsuite
(to ensure consistent data). Do you have any server side extensions

that might be left running after each test pass?

We have no server side extensions. We have been developing with only a
client library.

The point of our question is that we'd like to remove the risk which
our product using client library will have gotten slow while our
product and RTC server is running. So we'd like to know what the
cause of problem.

best regards,
-Takeshi

permanent link
Chetna Warade (106123) | answered Oct 31 '08, 9:50 a.m.
JAZZ DEVELOPER
Additionally a simple test would be to start metronome by Windows -> Preferences -> Team -> Jazz Source Control. Check metronome. It will display round trip response times of different commands. Connect to the repository while you are experiencing the slowness. For how to read the metronome stats pls read https://jazz.net/blog/index.php/2008/02/01/the-jazz-metronome-tool-keeps-us-honest/

permanent link
Chetna Warade (106123) | answered Oct 31 '08, 10:29 a.m.
JAZZ DEVELOPER
Additionally a simple test would be to start metronome by Windows -> Preferences -> Team -> Jazz Source Control from the Rational Team Concert client (GUI). Check metronome. It will display round trip response times of different commands. Connect to the repository while you are experiencing the slowness. For how to read the metronome stats pls read https://jazz.net/blog/index.php/2008/02/01/the-jazz-metronome-tool-keeps-us-honest/

permanent link
Change Vision (112) | answered Nov 05 '08, 9:46 p.m.
Hello, Jazz Team.

I had a mistake in a previous post.

incorrect:

We start a new server for each integration. And then we create new
data for test in Junit setUp method, and delete them in JUnit


correct:

We start a new server for daily integration. We run our integration three times per day.



We restart Our Jazz repository only one time per day.(We do NOT start a new Jazz repository process for each integration!)

So some workitems are saved in the repository at each integrations.But the workitems counts under 100, and we create some workitems the other integration, then Jazz repository's performance is gradually down and down.(Which is shown this thread's first message)

We haven't measured server performance circumstantially yet. We'll mesure with metronome.

-Takeshi

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.