Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We conducted a load test on our web application and we found that once the load goes beyond 40 users the server response time goes up drastically. (It was a 256MB RAM cloud machine).

So we installed squid reverse proxy in front of the apache server. Interestingly when we started load testing, we realized that the server is performing pretty well even for larger loads. We have a reason to be happy but then we want to know what exactly is causing this performance improvements.

We would like to know the following things

  1. Which requests are cached and which are not.
  2. Cache Hits : Cache Miss

Where should I look for this information ?

share|improve this question
    
What tool are you using to perform the load testing? –  ghm1014 Jun 13 '11 at 13:46
    
Apache JMeter....... –  Akshar Prabhu Desai Jun 16 '11 at 11:56

3 Answers 3

up vote 1 down vote accepted

Squid access/cache log parsing is one way to do that, but there are other ways, too.

You should use Squid SNMP MIB (if you already use SNMP for monitoring your servers) for general statistics about hit/miss ratio.

squidclient is an excellent command line tool for querying Squid status. It can show you cached objects, Squid process status, cached IP addresses, disk subsystem status, open file descriptors and whatnot. Try squidclient -h your_squid_host -p your_squid_port -u your_user -w your_password mgr:menu for all possible options. User and password can be configured in squid.conf.

Here are the possible options for squidclient:

 mem                    Memory Utilization      public
 cbdata                 Callback Data Registry Contents public
 events                 Event Queue     public
 squidaio_counts        Async IO Function Counters      public
 coss                   COSS Stats      public
 diskd                  DISKD Stats     public
 config                 Current Squid Configuration     hidden
 ipcache                IP Cache Stats and Contents     public
 fqdncache              FQDN Cache Stats and Contents   public
 idns                   Internal DNS Statistics public
 external_acl           External ACL stats      public
 http_headers           HTTP Header Statistics  public
 menu                   This Cachemanager Menu  public
 shutdown               Shut Down the Squid Process     hidden
 reconfigure            Reconfigure the Squid Process   hidden
 offline_toggle         Toggle offline_mode setting     hidden
 info                   General Runtime Information     public
 filedescriptors        Process Filedescriptor Allocation       public
 objects                All Cache Objects       public
 vm_objects             In-Memory and In-Transit Objects        public
 openfd_objects         Objects with Swapout files open public
 pending_objects        Objects being retreived from the network        public
 client_objects         Objects being sent to clients   public
 io                     Server-side network read() size histograms      public
 counters               Traffic and Resource Counters   public
 peer_select            Peer Selection Algorithms       public
 digest_stats           Cache Digest and ICP blob       public
 5min                   5 Minute Average of Counters    public
 60min                  60 Minute Average of Counters   public
 utilization            Cache Utilization       public
 histograms             Full Histogram Counts   public
 active_requests        Client-side Active Requests     public
 store_digest           Store Digest    public
 storedir               Store Directory Stats   public
 store_check_cachable_stats     storeCheckCachable() Stats      public
 store_io               Store IO Interface Stats        public
 pconn                  Persistent Connection Utilization Histograms    public
 refresh                Refresh Algorithm Statistics    public
 delay                  Delay Pool Levels       public
 forward                Request Forwarding Statistics   public
 client_list            Cache Client List       public
 asndb                  AS Number Database      public
 server_list            Peer Cache Statistics   public
 non_peers              List of Unknown sites sending ICP messages      public
share|improve this answer

Get the Calamaris package (http://cord.de/tools/squid/calamaris/). This reads your squid log files (assuming you turned on logging) and outputs reports which should give you what you are looking for.

share|improve this answer

goes beyond 40 users

This is a meaningless measure for webserver load.

(It was a 256MB RAM cloud machine)...So we installed squid reverse proxy

Without seeing a lot of data about how your system is behaving I would guess that the performance problems are a result of the limited amount of memory on the server; adding squid will have reduced this further.

server is performing pretty well

gosh. That's very unexpected - are you sure you optimized the webserver first?

Calamaris will give you lots of details about what squid is doing.

share|improve this answer
    
Learn to avoid rhetoric when answering the real question. –  Akshar Prabhu Desai Jun 13 '11 at 18:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.