Memory usage problem

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Memory usage problem

Post by saryas »

Hello, i've been using cacti for 3 weeks now on CentOS 5 and it is running very well except a problem with the memory usage. it varies alot which is not good for me because im using cacti to monitor a big network. i don't want to run out of memory...
please provide me with any solution you can think about!!

Thank you in advance!!
Attachments
This is the memory usage graph. you can see how it is varying.
This is the memory usage graph. you can see how it is varying.
memusage.JPG (65.26 KiB) Viewed 3793 times
User avatar
Hyperlord
Cacti User
Posts: 211
Joined: Tue Feb 10, 2009 3:24 am
Location: Frankfurt (a.M.), Germany

Post by Hyperlord »

Hi,

Could you please provide a graph of your MySQL Querycache, Memory usage and settings (res limits) from php.ini?

brgds
Om Tat Sat
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Post by saryas »

Hello,

This is the mysql query cache:

mysql> show variables like 'have_query_cache';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| have_query_cache | YES |
+------------------+-------+
1 row in set (0.00 sec)

mysql> show status like 'have_query_cache';
Empty set (0.00 sec)

mysql> show status like 'Qcache%';
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| Qcache_free_blocks | 0 |
| Qcache_free_memory | 0 |
| Qcache_hits | 0 |
| Qcache_inserts | 0 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 0 |
| Qcache_queries_in_cache | 0 |
| Qcache_total_blocks | 0 |
+-------------------------+-------+
8 rows in set (0.00 sec)



and here are my resource limits:

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M ; Maximum amount of memory a script may consume


I attached the graphs monitoring my CentOS.

thanks alot!!
Attachments
1.JPG
1.JPG (67.15 KiB) Viewed 3772 times
2.JPG
2.JPG (62.93 KiB) Viewed 3772 times
User avatar
Hyperlord
Cacti User
Posts: 211
Joined: Tue Feb 10, 2009 3:24 am
Location: Frankfurt (a.M.), Germany

Post by Hyperlord »

Hi,

sry was outside at customers all day long.
Could you please import the poller statistics template to check if cacti itself might cause this? I think the memory usage is kind of..."strange" ;)

http://docs.cacti.net/usertemplate:host:cacti:poller

Which poller do you use? Spine or CMD?
Do you have the Boost Plug-In activiated?
Have you checked "load balancing" in poller settings?

brgds
Om Tat Sat
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Post by saryas »

Hi,

I will import the poller statistics template and see the poller's performance and report the results i'm having. I'm using spine as a poller and boost plugin is activated too. I checked the "load balancing" in Poller settings and it set set to balance the process load.

Thank you!!
User avatar
Hyperlord
Cacti User
Posts: 211
Joined: Tue Feb 10, 2009 3:24 am
Location: Frankfurt (a.M.), Germany

Post by Hyperlord »

Mornin',

could you please give some Details about your spine Settings?
-> Maximum Concurrent Poller Processes
-> Maximum Threads per Process
-> Number of PHP Script Servers

You do 5m polling, not 1m, don't you?

I guess after that we have enough infos to really investigate.

brgds
Om Tat Sat
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Post by saryas »

Hello again,

These are the Poller information:

Poller Information

Interval 60
Type spine
Items Action[0]: 4755
Action[1]: 5
Action[2]: 14
Total: 4774
Concurrent Processes 3
Max Threads 10
PHP Servers 5
Script Timeout 150
Max OID 20
Last Run Statistics Time:7.3443 Method:spine Processes:3 Threads:10 Hosts:89 HostsPerProcess:30 DataSources:4730 RRDsProcessed:2463


I will give you also my cacti informations:

General Information
Date Thu, 29 Apr 2010 11:53:43 +0300
Cacti Version 0.8.7e
Cacti OS : unix
SNMP Version : NET-SNMP version: 5.3.2.2
RRDTool Version : RRDTool 1.3.x
Hosts 88
Graphs 2498
Data Sources :
Script/Command: 5
SNMP: 217
SNMP Query: 2270
Script - Script Server (PHP): 14
Total: 2506


Thank you alot for your help!!
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please comprehend the difference between memory in use and cache memory for disk caching. Also, if you want to increase performance as the system increases in size, use Boost.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Post by saryas »

Hello,

I checked the boost plugin settings and it turned out to be not working. i checked the boost's log file and had the following warnings:

PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: session_start(): open(/var/lib/php/session/sess_7lk01q92tue1ce3puet46v9td3, O_RDWR) failed: Permission denied (13) in /var/www/html/cacti/include/global.php on line 158
PHP Warning: Unknown: open(/var/lib/php/session/sess_7lk01q92tue1ce3puet46v9td3, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0


can you provide me with a solution for this problem please because i have no idea about how to resolve it!!

Thank you alot !!
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

chmod 777 on that directory.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Post by saryas »

Hello again,

I executed the chmod command on the path i had in the log file and i have no warnings about it anymore but i still have the following warning:

PHP Warning: Module 'PDO' already loaded in Unknown on line 0


how can i resolve it??

Thank you in advance!!!
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Edit /etc/php.ini (could be also /etc/php/... too) and remove the duplicated extension line for PDO. Restart Apache afterwards.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Post by saryas »

Hello again,

I used boost plugin and here are some graphs showing the performance of cacti. As you can see cacti is using alot of space from the RAM, actually in 5 days the free memory space decreased from 1.7 M to 747 K which isn't normal. I dont want to have to restart my server every week.

what can be the problem??? might it be something wrong with boost configuration???

i really really appreciate any help!!
Attachments
1.JPG
1.JPG (81.63 KiB) Viewed 3472 times
2.JPG
2.JPG (87.65 KiB) Viewed 3472 times
4.JPG
4.JPG (83.92 KiB) Viewed 3472 times
5.JPG
5.JPG (67.4 KiB) Viewed 3472 times
6.JPG
6.JPG (60.21 KiB) Viewed 3472 times
saryas
Posts: 30
Joined: Fri Mar 26, 2010 1:37 am

Post by saryas »

here is my boost plugin configuration:
Attachments
7.JPG
7.JPG (88.41 KiB) Viewed 3466 times
8.JPG
8.JPG (106.7 KiB) Viewed 3466 times
9.JPG
9.JPG (59.15 KiB) Viewed 3466 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

That's normal, the memory is disk cache, which can be consumed by any process that needs memory. It's your rrdfiles, sitting in memory to increase performance. It's completely normal.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests