This tip introduces the Agent Profiler feature, which was added with Domino 7.x. The Agent Profiler works in conjunction with Domino Domain Monitoring (DDM) and can help administrators detect and fix agent issues.
Most Domino admins would probably agree that a common cause of performance issues is poorly written agents. Agents can be triggered in a number of ways: by users, on a scheduled basis or by a Web user who opens or saves a document. Another agent can also be the trigger. Because there are so many ways to trigger an agent, it can be difficult to determine which agent is causing an issue. The Agent Profiler can help to determine the problem agent as well as areas that need to be fixed.
What does the Agent Profiler do?
When an agent is configured to be profiled, the Agent Profiler monitors the use of Lotus Domino object methods. Lotus Domino objects determine how a developer can access portions of Domino applications. For example, there are NotesDatabase objects that represent a Domino database. There are also NotesDocument objects that represent a document, or record, of a Domino database.
A method is part of an object that has a function. For example, the NotesDatabase object method OpenWithFailover will try to open a database on a Domino server. However, if a connection cannot be made to that server, and it is part of a Domino cluster, the method will try to open the database on a cluster mate. The Agent Profiler will also, when appropriate, indicate if the method being performed is a "get" or "set" method.
The Agent Profiler monitors the use of these objects and their methods throughout the process of the agent, calculating the time that each object's method consumes. It then stores the time so that it can be reviewed later.
How do you use the Agent Profiler?
One benefit of the Agent Profiler is that it's easy to use. From the security tab of an Agent's properties, there is a single check box labeled Profile this agent, as shown in Figure 1. When this box is checked, the agent will be profiled every time it runs.
Figure 1. The Profile this agent option instructs the agent to profile each time it runs.
To view the results of the Agent Profiler, go to the Agent view in Domino Designer, select the agent you profiled and then right-click on it. Next, select the View Profile Results option (Figure 2).
Figure 2. The View Profile Results option in the Agent Profiler.
The results will be similar to the following:
06/22/2009 01:20:58 PM EDT
Elapsed time: 17906 msec
Methods profiled: 39
Total measured time: 17550 msec
How to benefit from the Agent Profiler's results
As you can see in Table 1, a single item consumes the majority of the performance time. There are also a few other items that use a fair amount of time, but nothing too severe.
Table 1. Example of Profiler Agent results.
What do these results show? First, they show that the search method was being performed on databases that may or may not have been Full-Text indexed. In this particular case, it is looking for forms of the same type, so it might be possible to crawl a view with a sorted column -- instead of using the search feature. I recommend checking the database to see if it is Full-Text indexed. If so, use FTSearch instead of Search. If it's not Full-Text indexed, you could use Search. This can help reduce your search times.
In this case, I tested both. Using the process of crawling a view actually made things worse. However, using FTSearch when a database was Full-Text indexed and continuing to use Search when the database was not Full-Text indexed resulted in better performance. However, only one of the 42 databases was Full-Text indexed (Table 2).
06/22/2009 01:58:43 PM EDT
Elapsed time: 3391 msec
Methods profiled: 41
Total measured time: 3236 msec
Table 2. Results from using FTSearch and Search on 42 databases.
|ABOUT THE AUTHOR:|
Michael "Mike" Kinder is a senior application developer and administrator with over 14 years experience in the Lotus Notes/Domino environment, including work with BlackBerry, Barracuda, Sametime and integration with other systems. He is currently looking for consulting opportunities in both development and administration. He can be reached at firstname.lastname@example.org.
This was first published in July 2009