How to Set the Integrated Caching Memory Limits on NetScaler

How to Set the Integrated Caching Memory Limits on NetScaler

book

Article ID: CTX125061

calendar_today

Updated On:

Description

This article contains information about setting the Integrated Caching memory limits on a NetScaler appliance.

Requirements

The following are the basic requirements to perform this task:

  • NetScaler appliance with more than 4 GB of RAM

  • NetScaler nCore software release

  • General understanding of the memory usage on a NetScaler appliance

    Background

    In the NetScaler software releases earlier than the NetScaler nCore software release 9.1, the NetScaler appliance was limited to using no more than 4 GB of memory. Additionally, the cache was limited to the half of the total memory. As a result, you cannot allocate more than 2 GB of memory for caching. In some setups, this was not sufficient to cache the frequently accessed Web pages.

    Starting NetScaler nCore software release 9.1, you can allocate more memory to the cache. On appliances with more than 4 GB of memory, you can allocate additional memory for cache.


    Instructions

    For setting the Integrated Caching memory limits on a NetScaler appliance, complete the following procedure:

    1. Switch to the shell prompt.

    2. Run the following command to determine the amount of memory you can allocate for caching without any impact on other functions:
      nsconmsg –K /var/nslog/newnslog –g mem_cur_freesize –d minvalue

      This command displays the lowest free memory available. You must run this command to cover a large timeframe to ensure that it covers the abnormally high memory allocations, if any.

      The following is a sample output of the command for your reference:

      Displaying minimum value information
      NetScaler V20 Performance Data
      NetScaler NS9.2: Build 39.6.nc, Date: Mar 18 2010, 15:54:59
      Index value symbol-name&device-no&time
      0 12564065360 mem_cur_freesize_actual Wed Apr 14 21:35:59 2010
      1 12078658016 mem_cur_freesize Wed Apr 14 12:37:53 2010
    3. Note the value of the mem_cur_freesize parameter and deduct at least 10 percent of the total memory from it to account for the grown and unusual memory usage.

    4. Switch to the NetScaler command line interface prompt.

    5. Run the following command to verify the current memory allocation and amount of memory that can be used:
      ns1_nCore> show cache parameter

      Integrated cache global configuration:
      Memory usage limit: 2047 Mbytes
      Memory usage limit (active value): 2044 Mbytes
      Maximum value for Memory usage limit: 15772 Mbytes
      Via header: NS-CACHE-8.0: 230
      Verify cached object using: HOSTNAME_AND_IP
      Max POST body size to accumulate: 4096 bytes
      Current outstanding prefetches: 0
      Max outstanding prefetches: 4294967295
      Treat NOCACHE policies as BYPASS policies: YES
      Global Undef Action: NOCACHE
      Done
    6. Run the following command to set the new memory limit:
      ns1_nCore> set cache parameter -memLimit 10000

      You can use the maximum of the values you calculated in Step 3 of the one available in the Step 5. In this procedure, the memory limit is set to 10000 MB.

    7. Save the configuration.

    8. Restart the appliance to make the changes effective.
      Starting NetScaler software release 9.2 and later, you can also run reboot –warm.

    9. Run the following command to verify the memory allocation:
      ns1_nCore> show cache parameter

      Integrated cache global configuration:
      Memory usage limit: 10000 Mbytes
      Memory usage limit (active value): 10000 Mbytes
      Maximum value for Memory usage limit: 15772 Mbytes
      Via header: NS-CACHE-8.0: 230
      Verify cached object using: HOSTNAME_AND_IP
      Max POST body size to accumulate: 4096 bytes
      Current outstanding prefetches: 0
      Max outstanding prefetches: 4294967295
      Treat NOCACHE policies as BYPASS policies: YES
      Global Undef Action: NOCACHE
      Done
    10. Run the following command to verify the complete detail of the Integrated Caching statistics:
      ns1_nCore> stat cache –detail

      Integrated Cache Statistics – Detail
      Integrated Cache Statistics – Summary
      Rate (/s) Total
      Hits 0 0
      Misses 0 0
      Requests 0 0
      Hit ratio(%) -- 0
      Origin bandwidth saved(%) -- 0
      Cached objects -- 0
      Marker objects -- 0
      Rate (/s) Total
      Requests 0 0
      
      Hit Statistics
      Rate (/s) Total
      Non-304 hits 0 0
      304 hits 0 0
      Hits 0 0
      304 hit ratio(%) -- 0
      Hit ratio(%) -- 0
      Origin bandwidth saved(%) -- 0
      
      Byte Statistics
      Rate (/s) Total
      Bytes served by NetScaler 0 0
      Bytes served by cache 0 0
      Byte hit ratio(%) -- 0
      Compressed bytes from cache 0 0
      
      Miss Statistics
      Rate (/s) Total
      Storable misses 0 0
      Non-storable misses 0 0
      Misses 0 0
      Revalidations 0 0
      Successful revalidations 0 0
      Conversions to conditional req 0 0
      Storable miss ratio(%) -- 0
      Successful reval ratio(%) -- 0
      
      Flashcache Statistics
      Rate (/s) Total
      Expire at last byte 0 0
      Flashcache misses 0 0
      Flashcache hits 0 0
      
      Invalidation Statistics
      Rate (/s) Total
      Parameterized inval requests 0 0
      Full inval requests 0 0
      Inval requests 0 0
      
      Parameterized Caching Statistics
      Rate (/s) Total
      Parameterized requests 0 0
      Parameterized non-304 hits 0 0
      Parameterized 304 hits 0 0
      Total parameterized hits 0 0
      Parameterized 304 hit ratio(%) -- 0
      
      Poll Every Time (PET) Statistics
      Rate (/s) Total
      Poll every time requests 0 0
      Poll every time hits 0 0
      Poll every time hit ratio(%) -- 0
      
      Memory Usage Statistics
      Total
      Maximum memory(KB) 10240000
      Maximum memory active value(KB) 10240000
      Utilized memory(KB) 14
      Memory allocation failures 0
      Largest response so far(B) 0
      Cached objects 0
      Marker objects 0
      
      Hits being served 0
      Misses being handled 0
      
      Done

    You can use the value of the Utilized Memory parameter to determine is an access memory is allocated for caching. You should verify this value when you expect that the cache is being completely utilized.

    Issue/Introduction

    This article contains information about setting the Integrated Caching memory limits on a NetScaler appliance.

    Additional Information

    Citrix Documentation - Integrated Caching