- CheckMates
- :
- Products
- :
- Quantum
- :
- Management
- :
- cpview(mem) vs free
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cpview(mem) vs free
Why do free and cpview give different results for loading memory?
for example:
cpview
total used Free
Physical 31 914 19 969 11 900
free
total used free shared buffers cached
Mem: 32680404 32012872 667532 0 360916 11096040
Whom to believe? and because of what is happening?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The various Check Point tools like cpview, when reporting the value for "free", do not distinguish between memory allocated for code execution vs. memory allocated for buffering/caching. Memory allocated for the latter can be swiped at any time for code execution if needed. So the free value reported by cpview reveals the amount of memory not being used for anything at all.
If you look at the full output for free -m like this:
total used free shared buffers cached
Mem: 7843 7678 165 0 28 2122
-/+ buffers/cache: 5527 2316
Swap: 8189 0 8189
Looking at the "Mem" line you might panic because it looks like there is very little free memory (165MB). The line you want to look at to see how much memory is actually available for code execution if needed is "-/+ buffers/cache". As we can see 5527MB is actually being used for code execution with 2316MB used for caching & buffering and unused (28+2122+165 from line 1). So if more memory is needed for code execution 2316MB is available, not 165MB as reported on the first line (and by the various Check Point tools).
--
My Book "Max Power: Check Point Firewall Performance Optimization"
Second Edition Coming Soon
March 27th with sessions for both the EMEA and Americas time zones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's because CPView is displaying in MB where free on it's own will use KB, you can use free -m for Megabytes or even free -g for Gigabytes.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The various Check Point tools like cpview, when reporting the value for "free", do not distinguish between memory allocated for code execution vs. memory allocated for buffering/caching. Memory allocated for the latter can be swiped at any time for code execution if needed. So the free value reported by cpview reveals the amount of memory not being used for anything at all.
If you look at the full output for free -m like this:
total used free shared buffers cached
Mem: 7843 7678 165 0 28 2122
-/+ buffers/cache: 5527 2316
Swap: 8189 0 8189
Looking at the "Mem" line you might panic because it looks like there is very little free memory (165MB). The line you want to look at to see how much memory is actually available for code execution if needed is "-/+ buffers/cache". As we can see 5527MB is actually being used for code execution with 2316MB used for caching & buffering and unused (28+2122+165 from line 1). So if more memory is needed for code execution 2316MB is available, not 165MB as reported on the first line (and by the various Check Point tools).
--
My Book "Max Power: Check Point Firewall Performance Optimization"
Second Edition Coming Soon
March 27th with sessions for both the EMEA and Americas time zones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help and explanation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for explanation
[Expert@sisefw:0]# free -m
total used free shared buffers cached
Mem: 32053 31627 426 0 120 22346
-/+ buffers/cache: 9160 22892
Swap: 17422 0 17421
[Expert@sisefw:0]#
----------------------------------------------------------------------------------------------------------------------------------------------------------|
| CPU: |
| |
| Num of CPUs: 8 |
| |
| CPU Used |
| 2 50% |
| 3 37% |
| 5 33% |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Memory: |
| |
| Total MB Used MB Free MB |
| Physical 32,053 9,163 22,889 |
| Swap 17,422 0 17,421
