• Share
  • ?
  • Profiles ▼
  • Communities ▼
  • Apps ▼

Blogs

  • My Blogs
  • Public Blogs
  • My Updates
  • Administration
  • Log in to participate

▼ Tags

 

▼ Similar Entries

IBM APM 8.1.4 Respon...

Blog: Application P...
ericmtn 1000009W88
Updated
1 people likes thisLikes 1
No CommentsComments 0

Aardpfark 简介:将 Spark...

Blog: developerWork...
developerWorks中国 2700027P1B
Updated
0 people like thisLikes 0
No CommentsComments 0

Compile PHP, Informi...

Blog: developerWork...
Gadde_Radhika 50J9GYTSQP
Updated
0 people like thisLikes 0
No CommentsComments 0

Set up separate IHS ...

Blog: CSE-WebSphere...
YueHWang 3100020K52
Updated
0 people like thisLikes 0
CommentsComments 3

使用 Oozie 调度 Spark 应用...

Blog: developerWork...
dwchina_community 310002PYN6
Updated
0 people like thisLikes 0
No CommentsComments 0

▼ Similar Ideas

Apache Spark and Mac...

Ideation Blog: Open Ideas
daisydreamz 310002KDNT
Updated
No Votes 0 No CommentsComments 0

▼ Archive

  • December 2018
  • November 2018
  • September 2018
  • March 2018
  • December 2017
  • October 2017
  • September 2017
  • February 2017
  • January 2017
  • October 2016
  • September 2016
  • July 2016
  • May 2016
  • March 2016
  • February 2016
  • November 2015
  • October 2015
  • September 2015
  • June 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • November 2014
  • September 2014
  • July 2014
  • June 2014
  • April 2014
  • March 2014
  • October 2013
  • August 2013
  • June 2013
  • May 2013
  • March 2013
  • February 2013
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • March 2012
  • November 2011
  • September 2011
  • August 2011
  • June 2011
  • May 2011
  • February 2011
  • October 2010
  • September 2010
  • August 2010
  • July 2009
  • June 2009
  • March 2009
  • February 2009
  • August 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008

▼ Links

  • Portal L2 Blog
  • Thoughts on Web Content Manage...
  • Web Content Manager Forum
  • WebSphere Portal Forum
  • WebSphere Portal Security, Por...
  • WebSphere Portal zone

▼ Blog Authors

Portal administration and performance

View All Entries
Clicking the button causes a full page refresh. The user could go to the "Entry list" region to view the new content.) Entry list

Finding Long Page Response Times

AlexLang 100000NC7C | | Tags:  apache ihs responsetime ‎ | 9,146 Views

When attempting to find the response times of Portal pages, the first important question is to decide where you want to measure the times. Most people think of the response time at the client browser as the thing they want to measure. This is the most obvious and logical choice. However, it is also the hardest to measure and aggregate. The next place, which is easy to measure and aggregate, is at the WebServer (e.g. IHS, Apache) that serves the Portal Servers. This will be our measurement location in the Portal topology.

 

To measure response times in Apache or IHS, you need to change the LogFormat directive in “/HTTPServer/conf/httpd.conf” to include the %D directive. “%D” is the microsecond timer which measures response times. So, the default and revised LogFormat directives are as follows.

 

This is the default “out of the box” LogFormat directive:

“LogFormat "%h %l %u %t \"%r\" %>s %b" common”

 

This is the one I typically use:

“LogFormat "%h %l %u %t \"%r\" %>s %b %D microsecs %{was}e Cache_Control: %{cache-control}o Cache Age: %{Age}o" common”

 

Notice the “%D microsecs”. This is the response time monitor. I typically also include other directives as well. They are:

 

%{was}e: Logs the WebSphere server to which this request was routed. Useful for load balancing.

%{cache-control}o: Logs the “cache-control” header. Useful for seeing the cacheability of the response.

%{Age}o: Logs the “Age” header. Useful for seeing if the response was returned from the IHS cache.

 

Note that you also need a “CustomLog” directive for “common” to insure that this LogFormat directive gets used.

 

So, at this point, IHS (Apache) is configured to log all request/response times in the access_log file in the “logs” subdirectory of IHS. Note that this filename may be different if configured to be so.

 

So, now the process is just to examine the access log for the response times that one is interested in. In this case, we care about log response times. For most Web applications, greater than 4 seconds is considered long. So, a simple “grep” of the access logs will provide those responses. For reasons of simpler “grep” commands, I’ll start with response times greater than 10 seconds. Here is a sample “grep”:

 

grep "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] microsecs" access_log

 

Here is a sample line from the access_log file:

 

127.0.0.1 - - [04/Aug/2015:11:10:37 -0400] "GET /wps/myportal/!ut/p/z1/04_Sj9CPykssy0xPLMnMz0vMAfIjo8ziTT0NHT0svQ28_U1cTQwcXZ1CAnx9DQwM_I30wwkpiAJKG-AAjgZA_VFgJbhMcDeAKkDX6RRk5GQMlAdZQciSgtwIg0xPR0UAa1uCEQ!!/dz/d5/L2dBISEvZ0FBIS9nQSEh/ HTTP/1.1" 200 41215 6241394 microsecs aclfc19:10039 Cache_Control: no-cache, no-store, must-revalidate Cache Age: -

 

This “grep” looks for a character sequence with 8 digits (which includes 10 seconds and greater) followed by the string “microsecs”.

 

By using this basic pattern, one can get the long response times. If, for example, you want a sorted list of response times, you can rely on the fact that the response time is the 11th field in the access_log. So the command:

 

grep "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] microsecs" access_log | sort -k 11

 

will sort the list in increasing order of response time.

 

grep "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] microsecs" access_log | grep -v HEAD | sort -k 11

 

will strip out all the “HEAD” GET requests (used by health checkers like F5 and Edge) before sorting. Normally, HEAD requests are very, very fast so this is not usually needed.

 

Of course, we haven’t talked about which pages are long yet! That information is simply the beginning of each line returned by the “grep”. In this case, the page is “/wps/myportal/!ut/p/z2/04_Sj9CPykssy0xPLMnMz0vMAfIjo8ziTT0NHT0svQ28_U1cTQwcXZ1CAnx9DQwM_I30wwkpiAJKG-AajgZA_VFgJbhMcDeAKkDX6RRk5GQMlAdZQciSgtwIg0xPR0UAa1uCEQ!!/dz/d5/L2dBISEvZ0FBIS9nQSEh/”. However, except for the “/wps/myportal”, this doesn’t look like a recognizable page. If you want the URLs to indicate the page, you need to insure that every page and label in Portal has a “friendly” URL specified. That way, the full page name will appear in the URL. The information in the URL above after “!ut” is “state” information. This is decodable to the acutal page name as well but is beyond the scope of this paper.

Modified on by AlexLang 100000NC7C
  • Add a Comment Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry
Notify Other People
notification

Send Email Notification

+

Quarantine this entry

deleteEntry
duplicateEntry

Mark as Duplicate

  • Previous Entry
  • Main
  • Next Entry
Feed for Blog Entries | Feed for Blog Comments | Feed for Comments for this Entry