Try Playground
Show / Hide Table of Contents

Memory Dumps

You can create memory dumps for monitoring cache and service performance. Memory dumps provide a detailed overview of all the processes running in a cache server or a service at a given time. They are useful when identifying performance issues, as they facilitate troubleshooting. NCache offers memory dumps for both Windows and Linux environments. They can be managed through the NCache Managment Center or the Command-Line.

Memory dumps can be created for each registered cache and running service and are stored in a folder named memory-dumps located at %NCHOME%\memory-dump (Windows) or /opt/ncache/memory-dump (Linux). Each dump is named after the cache/service name, timestamp, and server IP. The following memory dumps can be created using the NCache Managment Center under the server node section:

Note

Starting the cache is not required to create service dumps.

Using NCache Management Center

  • Launch the NCache Management Center by browsing to http://localhost:8251 or <server-ip>:8251 on Windows and Linux.

  • In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache which is to be started.

  • Check the box against the cache to start.

  • Click on the Select Cache to Start Web Button button on the toolbar to start the cache.

Select Cache to Start Web

  • The icon against the cache servers will change from grey to blue, and you will receive a success notification.

  • Once the cache starts, click on View Details on the right side against the selected cache name.

Start Cache on a node Web

  • This opens the detailed configuration page for the cache.

  • Under the Server Nodes tab, click on "..." against the cache and click on Create Dump(s) option. It will open a sub-menu.

Create Dumps options

  • The sub-menu has 4 options, which are as follows:

    • Create Cache Dump: to create a cache dump that includes information about all the modules running on that particular cache process.
    • Create Service Dump: to create a service dump that includes information about all the caches, operations, and processes running on that particular service such as cache creation, management process, and any other runtime operation.
    • Create Execution Service Dump: to create an execution service dump that includes information about task handling processes and operations such as loading data in the cache from a data source, ensuring optimized and automated data population.
    • Create Bridge Service Dump: to create a bridge service dump that includes information about all Bridge operations and data synchronization processes across geographically distributed caches.
  • You can click on any of the above options and a success or failure notification will appear upon the completion of dump process.

Enable ptrace for Dump Creation (Linux)

The ptrace capability controls how processes can be debugged or traced using the ptrace() system call. It is essential for tools like createdump. You need to enable the ptrace flag for the creation of memory dumps for Linux else you will get the error: "Permission Denied: Failed to take memory dump. This is due to restricted memory access". You can enable ptrace in the following way:

System-Wide Configuration (Affects All Users and Processes)

This method changes the kernel setting for all users and processes on the system. Proceed with the following steps to enable this:

  • In the terminal, check current settings:
cat /proc/sys/kernel/yama/ptrace_scope

The ptrace_scope controls how users can interact with processes via ptrace() kernel. The echo values can range from 0-3 as discussed here. Use the value "0" to receive dumps. A value of 0 removes restrictions, allowing ptrace() to work for any process the user owns.

  • Enable full access (run as root or with sudo):
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope 

Using Command Line Tools

The following New-MemoryDump command helps the user to create memory dumps for the specified server 20.200.20.11.

  • Windows
  • Linux
New-MemoryDump -Server 20.200.20.11 -CacheName demoCache

Please note that you need to enable the ptrace flag for the creation of memory dumps in Linux else you will get the error: "Permission Denied: Failed to take memory dump. This is due to restricted memory access". Set the value of ptrace_scope to 0 to resolve the error.

new-memorydump -server 20.200.20.11 -cachename demoCache

See Also

Get-MemoryDumpList
Remove-MemoryDump
Send-MemoryDump

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top