Submit Your CMD.PHP vs. SPINE Metrics Here

Important information about Cacti developments that all users should be interested in.

Moderators: Developers, Moderators

Post Reply
Mikf
Posts: 47
Joined: Fri Aug 13, 2004 11:35 am
Location: Paris, France

Memory

Post by Mikf »

Hi!

a few weeks ago, we have seen the time to write data in the rrd files growing up to 500/600 secondes !!! (see cacti_time.jpg)
(the time to poll is always 70/80 sec, but the rrdtool process take about 500/600 sec)
There was 1go of memory on this server.
with the "free" command we could see a usage of 300Mo and 700Mo of cache.

Now we have upgraded to 4Go of memory : the poller is terminating in 77 sec!
with 3go of cached memory.
15681 rrds, 26735 data sources, 755 hosts (~11go of data)

poller server :
debian sarge
bi-Xeon 2.8GHz
6x36go (Raid 0+1 for fast writing)
4Go RAM

mysql server :
xeon 2.8
1go
2x36 raid 1

Code: Select all

10/23/2006 09:01:18 PM - THOLD: Poller[0] Checking Thresholds  
10/23/2006 09:01:17 PM - SYSTEM STATS: Time:76.6549 Method:cactid Processes:5 Threads:5 Hosts:755 HostsPerProcess:151 DataSources:26735 RRDsProcessed:15681  
10/23/2006 08:56:18 PM - THOLD: Poller[0] Checking Thresholds  
10/23/2006 08:56:18 PM - SYSTEM STATS: Time:76.8134 Method:cactid Processes:5 Threads:5 Hosts:755 HostsPerProcess:151 DataSources:26735 RRDsProcessed:15675  
10/23/2006 08:51:19 PM - THOLD: Poller[0] Checking Thresholds  
10/23/2006 08:51:19 PM - SYSTEM STATS: Time:77.3659 Method:cactid Processes:5 Threads:5 Hosts:755 HostsPerProcess:151 DataSources:26735 RRDsProcessed:15693  

Code: Select all

# free
             total       used       free     shared    buffers     cached
Mem:       3486012    3356676     129336          0     146124    2871532
-/+ buffers/cache:     339020    3146992
Swap:      2097136          0    2097136
don't forget the memory ;)
-
Mikf
Attachments
cacti_time.jpg
cacti_time.jpg (25.54 KiB) Viewed 6039 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

[quote=tobi]Hi Folks,

Every now and then there are discussions on the toppic of How fast
is your system. To get some comparison numbers, I have written this
very "update heavy" rrd performance tester.

I will include it with the next rrdtool release.
For now you can get it from

http://oss.oetiker.ch/rrdtool/pub/contrib

I would be interested to see some numbers ...
especially on windows hosts ...


cheers
tobi[/quote]
Found this very interesting post on the rrdtool-users mailing list. Personally, I'd like to see your results here (and of course: sent it to tobi)
Reinhard
Last edited by gandalf on Fri Oct 27, 2006 4:22 pm, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

In fact, at Linux World 2006 in SanFrancisco, we had this discussion and I have at the tips of my fingers a new approach, suggested by Phillip Simonet (aka Getif author) to increase Cacti scalability by at least one order of magnitude.

The prolem is, my fingers keep moving over the keyboard answering posts. Who votes that I should start work on that right away. I am now typing with one hand ;)

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?
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

My system is a P4 3.8Ghz 2GB RAM and a pair of 250GB SATA drives (16MB Cache) in a software RAID 1 using GMirror.


I ran this new RRDTool tester and here are my results:

./perftest.pl

RRDtool Performance Tester
--------------------------
This Program will create an increassing number of rrds and update them.
The rrds are modeld after what mrtg would create. The Program
will report the number of updates that can be performed per second.
Since rrdtool update performance is helped greatly by the disk cache,
you will observe a sharp drop in performance once the cache is
exhausted. The program tries to detect this change and stop running.

Create 10 rrds 5 c/s (0.03147 sdv) Update 10 rrds 13902 u/s (0.00006 sdv)
Create 10 rrds 1 c/s (0.32202 sdv) Update 20 rrds 7805 u/s (0.00617 sdv)
Create 20 rrds 1 c/s (0.67108 sdv) Update 40 rrds 13992 u/s (0.00004 sdv)
Create 40 rrds 1 c/s (0.23411 sdv) Update 80 rrds 13668 u/s (0.00014 sdv)
Create 80 rrds 2 c/s (0.27723 sdv) Update 160 rrds 11949 u/s (0.00042 sdv)
Create 160 rrds 1 c/s (0.28893 sdv) Update 320 rrds 11388 u/s (0.00049 sdv)
Create 320 rrds 1 c/s (0.33756 sdv) Update 640 rrds 7002 u/s (0.00174 sdv)
Create 640 rrds 2 c/s (0.28723 sdv) Update 1280 rrds 2331 u/s (0.01347 sdv)
Create 384 rrds 1 c/s (0.33604 sdv) Update 1664 rrds 617 u/s (0.05014 sdv)

* Stopping test since your system seems to have hit the cache barrier.



Here is a typical normal poller run time on my system:
10/27/2006 11:18:33 PM - SYSTEM STATS: Time:212.4849 Method:cactid Processes:2 Threads:60 Hosts:199 HostsPerProcess:100 DataSources:22839 RRDsProcessed:8785

I sometimes see my poller run in 82 seconds for a few runs which is great, but most of the time my poller is around 220 seconds.

Oddly, when my system first boots, I sit with about 1.5GB of RAM free.
Then poller.php runs cactid and bang, my system runs there after with only about 50MB of RAM free, sometimes it hits 0 and my swap gets hit!


I am starting to think I need 4GB of RAM as stated a few posts ago by:
Mikf - "Now we have upgraded to 4Go of memory : the poller is terminating in 77 sec! with 3go of cached memory. "
It is weird to see the poller suck up 1.5GB of RAM on the first run then never really release it back to the OS.
At first I thought I had a memory leak, but it never uses more than 1.5GB after that first run.

Even stranger:
When a polling cycle starts, I see my CPU peg for about 20 seconds.
For the next about 3 minutes or so, my CPU is hardly used while the poller completes a cycle.
I imagine cactid is completing in 20 seconds or so?
What am I waiting for during the remaining 3 minutes?
Is that when my RRD files are being updated?
Why do I sometimes get these awesome 82 second runs for a polling cycle?
I am afraid to add more devices to my cacti since my poller is close to 300 seconds sometimes for unknown reasons.

Any thoughts on boosting performance?

"TheWitness: increase Cacti scalability by at least one order of magnitude"
Please do so TheWitness! I would like to get my system to handle 100k data sources, currently I am hitting a 300 second limit on 25k data sources.
I am ready to do multiple pollers, add more RAM and another CPU, whatever is practical.
Let's scale up Cacti as much as possible please!'
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cigamit and I had a coding marathon tonight. We will make some change on Saturday/Sunday and then perform some internal testing next week. We are going to make it a plugin called "boost". Named it myself, although we did kick around a lot of names, but mostly for Cactid....

Oh, 4GBytes of RAM is CHEEP these days, you should buy 8GBytes....

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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote:Oh, 4GBytes of RAM is CHEEP these days, you should buy 8GBytes....
Eh? Did you say SHEEP? :lol: :lol: :lol:
Your improvements do relate to a specific version of rrdtool?
Reinhard
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It's that 2+am talk. Any version, I am pretty sure, this is not a difficult fix, I think you'll like it.

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?
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

You just can't say: "boost" and let us hanging! Give us a hint, what will the plugin do?
Does it involve rrdsrv on TCP port 13900?

Also, were you serious about me going to 8GB?
I am still curious why the polling on my box takes 220 seconds and only the first 20 seconds or so hit the CPU hard.
Am I waiting on disk write speed for the other 200 seconds?
I feel like the poller.php could be working my CPU harder and then get done sooner, but it doesn't!
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Boost will fix that double....

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?
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

I am ready to test Boost when it is ready!
:wink:
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

rrdtool perftest

Post by gandalf »

System data:
Type:IBM T30 Laptop
CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz
Memory: 1GB
Disk: IC25N020ATCS04-0 IBM 2,5" 20GB for Laptops
OS: Linux 2.6.9-22.0.2.EL (RHEL 4)
Filesystem type: EXT3-FS (journaling filesystem)
Most often, following results are retrieved
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 763952
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 77100
UCD-SNMP-MIB::memCached.0 = INTEGER: 46144
Starting at Sa Okt 28 18:47:24 CEST 2006

Create 10 rrds 1 c/s (0.00330 sdv) Update 10 rrds 7091 u/s (0.00058 sdv)
Create 10 rrds 1 c/s (0.00220 sdv) Update 20 rrds 8688 u/s (0.00045 sdv)
Create 20 rrds 1 c/s (0.00444 sdv) Update 40 rrds 8892 u/s (0.00026 sdv)
Create 40 rrds 1 c/s (0.00926 sdv) Update 80 rrds 8793 u/s (0.00027 sdv)
Create 80 rrds 1 c/s (0.01775 sdv) Update 160 rrds 6772 u/s (0.00146 sdv)
Create 160 rrds 1 c/s (0.03550 sdv) Update 320 rrds 7247 u/s (0.00037 sdv)
Create 320 rrds 1 c/s (0.07304 sdv) Update 640 rrds 8417 u/s (0.00031 sdv)
Create 640 rrds 3 c/s (0.14394 sdv) Update 1280 rrds 7795 u/s (0.00032 sdv)
Create 1280 rrds 2 c/s (0.28857 sdv) Update 2560 rrds 6990 u/s (0.00015 sdv)
Create 2560 rrds 2 c/s (0.53949 sdv) Update 5120 rrds 97 u/s (0.07093 sdv)
Create 1536 rrds 1 c/s (0.28277 sdv) Update 6656 rrds 6467 u/s (0.00017 sdv)
Ending at Sa Okt 28 18:49:42 CEST 2006

UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 260328
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 90292
UCD-SNMP-MIB::memCached.0 = INTEGER: 524984
I've added memory data taken directly before and after each run. But sometimes, the results fall down to
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 749560
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 90524
UCD-SNMP-MIB::memCached.0 = INTEGER: 45884
Starting at Sa Okt 28 18:50:39 CEST 2006

Create 10 rrds 1 c/s (0.00336 sdv) Update 10 rrds 7872 u/s (0.00032 sdv)
Create 10 rrds 1 c/s (0.00263 sdv) Update 20 rrds 9045 u/s (0.00030 sdv)
Create 20 rrds 1 c/s (0.00454 sdv) Update 40 rrds 9010 u/s (0.00024 sdv)
Create 40 rrds 1 c/s (0.00891 sdv) Update 80 rrds 8865 u/s (0.00025 sdv)
Create 80 rrds 1 c/s (0.01781 sdv) Update 160 rrds 8708 u/s (0.00026 sdv)
Create 160 rrds 1 c/s (0.03609 sdv) Update 320 rrds 4685 u/s (0.00216 sdv)
Create 320 rrds 1 c/s (0.20672 sdv) Update 640 rrds 1040 u/s (0.01843 sdv)
Create 192 rrds 3 c/s (0.35805 sdv) Update 832 rrds 1947 u/s (0.02332 sdv)
Ending at Sa Okt 28 18:51:30 CEST 2006

UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 687656
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 93552
UCD-SNMP-MIB::memCached.0 = INTEGER: 105504
These results are taken from a run of 30 loops of perftest.pl (done by a shell script) without any sleep time between runs. I'm wondering, if this is due to write throughput of my disk. And I suppose, there should be some impact of disk write cache as well.

Compared to the data of N3NCY, taken from a more decent system, I'm wondering about the high throughput of my old laptop.

Reinhard
User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Post by Instigater »

Server:
P4 Xeon 3Ghz
5Gig RAM
2x 72Gb SCSI 10krpm RAID1

RRD files ar huge to hold 1 minute resolution up to 1 month.

Code: Select all

10/29/2006 12:26:34 PM - SYSTEM STATS: Time:32.3988 Method:cactid Processes:4 Threads:8 Hosts:128 HostsPerProcess:32 DataSources:4405 RRDsProcessed:2145
Mikf
Posts: 47
Joined: Fri Aug 13, 2004 11:35 am
Location: Paris, France

perftest

Post by Mikf »

debian sarge
bi-Xeon 2.8GHz
6x36go (Raid 0+1 for fast writing)
4Go

# perl perftest.pl

...

Create 10 rrds 1 c/s (0.00068 sdv) Update 10 rrds 13829 u/s (0.00001 sdv)
Create 10 rrds 1 c/s (0.00071 sdv) Update 20 rrds 13766 u/s (0.00001 sdv)
Create 20 rrds 1 c/s (0.00140 sdv) Update 40 rrds 13738 u/s (0.00001 sdv)
Create 40 rrds 1 c/s (0.00284 sdv) Update 80 rrds 13543 u/s (0.00002 sdv)
Create 80 rrds 1 c/s (0.00565 sdv) Update 160 rrds 13258 u/s (0.00003 sdv)
Create 160 rrds 1 c/s (0.01139 sdv) Update 320 rrds 13017 u/s (0.00004 sdv)
Create 320 rrds 1 c/s (0.02255 sdv) Update 640 rrds 7195 u/s (0.00141 sdv)
Create 640 rrds 3 c/s (0.04549 sdv) Update 1280 rrds 3271 u/s (0.00107 sdv)
Create 384 rrds 1 c/s (0.02800 sdv) Update 1664 rrds 5762 u/s (0.00072 sdv)
Last edited by Mikf on Sun Oct 29, 2006 2:08 pm, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: perftest

Post by gandalf »

Mikf wrote:# perl perftest.pl

...

Create 10 rrds 1 c/s (0.00068 sdv) Update 10 rrds 13829 u/s (0.00001 sdv)
Create 10 rrds 1 c/s (0.00071 sdv) Update 20 rrds 13766 u/s (0.00001 sdv)
Create 20 rrds 1 c/s (0.00140 sdv) Update 40 rrds 13738 u/s (0.00001 sdv)
Create 40 rrds 1 c/s (0.00284 sdv) Update 80 rrds 13543 u/s (0.00002 sdv)
Create 80 rrds 1 c/s (0.00565 sdv) Update 160 rrds 13258 u/s (0.00003 sdv)
Create 160 rrds 1 c/s (0.01139 sdv) Update 320 rrds 13017 u/s (0.00004 sdv)
Create 320 rrds 1 c/s (0.02255 sdv) Update 640 rrds 7195 u/s (0.00141 sdv)
Create 640 rrds 3 c/s (0.04549 sdv) Update 1280 rrds 3271 u/s (0.00107 sdv)
Create 384 rrds 1 c/s (0.02800 sdv) Update 1664 rrds 5762 u/s (0.00072 sdv)
What are your system data (please see list given in my post above)?
Thanks
Reinhard
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

First version of boost is off to developers and certain others. I am moving fast on this plugin, but I don't want to get it wrong. So, it will still be a few more days/week before release.

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 1 guest