Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Re: Central MA database size snuck up on me

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Re: Central MA database size snuck up on me


Chronological Thread 
  • From: "Uhl, George D. (GSFC-423.0)[SGT INC]" <>
  • To: Casey Russell <>
  • Cc: "" <>, "Noss, Martyn J. (GSFC-420.0)[InuTeq, LLC]" <>
  • Subject: Re: [perfsonar-user] Re: Central MA database size snuck up on me
  • Date: Mon, 28 Aug 2017 16:44:22 +0000
  • Accept-language: en-US
  • Dkim-filter: OpenDKIM Filter v2.11.0 ndmsvnpf103.ndc.nasa.gov AE0B1401B201
  • Ironport-phdr: 9a23:nPJ5kRxjIRzJe1/XCy+O+j09IxM/srCxBDY+r6Qd0uoQL/ad9pjvdHbS+e9qxAeQG96Ku7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q89pDXYAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7Vq4/Vyi84Kh3SR/okCYHOCA/8GHLkcx7kaZXrAu8qxBj34LYZYeYO/RkfqPZYNgUW2xPUMhMXCBFG4+xb44DAuwcNuhasob9vUMDoxugCwexGOPhxDxGhnH00qI00uQuDQ7J0Rc6EN4SqnnZtsn5Ob0SXO2z0aLGzS/Db/RT2Trl5oTHfBAhofWUUbltcMTe104vFxnKjlqOtIfrMSmZ3fkJv2aa8uRuVfyih3copg1vrDWj3NsghozNiYwIy17K6zhyzoUtK9CmTkF3b8OvHZxfty6EMIt2WMwiTH9ytCkn0LEGpJ67fCwRxZQh3RHfcOaIf5KH4hLkSuacODF1j29rdrK4gha960mgyuvkW8mw0VZKqClFncfRuXAM0Rzf8NSISvx4/ku5xTaO2QHT6v1YIU8qj6rXMYIuwrk1lpYLqUTMADX2mEvtjK+RcEUr4PKo5/7hYrr4up+QL4x0hRv4MqQ0hMO/B/40Mg4QUGiH/+m3yb7t/VXhTblXivA7kbPVvI3HKckZvKK1HxVZ3psj5huxFzuqzdAVkHodIF5YZh6Lk5LlN0/QLP33F/uygVuhnC92y/3HOrDtGIvBI3jMnbv7YLpx8VBQxBY1wNtC/ZxbEKsBL+j2WkLptNzXEBs5MwuszubhFdp905geWXyJAq+BPqPerEOE6+w1L+mKeYAapCzxK/4/6P71l3A1g1Adfa633ZcPaXC4GOppI1mBbHbxhtoMEn0GshcjQOHoklGOTSRfa2uyUq8y/j07DZipDYbHRoCjmryB2yK7E4VZZm9YDVCMC3joeJueV/gRci6SP89hkjgfWLinUYAhzguhuBX1y7pgMOrY4jcYuo771Nhp++3Tkgk/9SRqAMSH3WGNVGZ0nmUSSD8sxax/vFd9xUmZ0aVjh/xYFMdT5+9SUgskL5Lczup6C8zsVQLbeNeGVkqmTsu8DT4vU90x3oxGX0EoMNy5gwGL5TexGLIRk/TfD4Yp6bnR23zZJM970XvAkq8skw91bNFIMDjsu657s0D8ConTnEjRu+DiNYsn8gWIqD3YizLPj3p3bEZRd47wFzhLaUbRt9v0oE+EUr+qIbIuKQIHxsmcfPgZIub1hElLEa+wcO/VZHi8ziLpXUuF

Hi Casey,

Thanks for following up!  I’m running a Central MA that I stitched together back in 2015.  I’m thinking that a lot of the more recent cassandar/esmond support scripts might not be as backwards compatible as I had hoped.  So in lieu of trying to remove old data which eventually I will need to do, I went ahead and expanded the logical disk to buy some time until I can clean up the current MA and replace it with a new one.

Thanks,
George

From: Casey Russell <>
Date: Monday, August 28, 2017 at 9:46 AM
To: George Uhl <>
Cc: "" <>, "Noss, Martyn J. (GSFC-420.0)[InuTeq, LLC]" <>
Subject: Re: [perfsonar-user] Re: Central MA database size snuck up on me

George,

     I'm not sure if this is the cause of your error, but I do remember a couple of problems I encountered in the documentation for the script on this page:



First if you haven't yet migrated to CentOS 7, you have to run the following commands PRIOR to running the ps_remove_data.py script:

(taken from that page)

cd /usr/lib/esmond
source /opt/rh/python27/enable
/opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .
. bin/activate
python /usr/lib/esmond/util/ps_remove_data.py -c usr/lib/esmond/util/ps_remove_data.conf

Three things to note:

That third command does have a period at the end and it does matter.  That fourth command does have a period and it matters as well.  :-)

If you've run this more than once, then you'll get an error in the output of the third command that reads: "New python executable in ./bin/python2  Not overwriting existing python script ./bin/python (you must use ./bin/python2)"  It appears to be harmless.

Finally, there's an error in the last command.  You'll have to add the leading "/" character in the file path at the end of the command.  So the corrected command will look like this.  

python /usr/lib/esmond/util/ps_remove_data.py -c /usr/lib/esmond/util/ps_remove_data.conf

Now maybe that will help you, maybe not.  But it might help others who are looking to run that script manually.


Sincerely,
Casey Russell
Network Engineer
KanREN
phone785-856-9809
2029 Becker Drive, Suite 282
Lawrence, Kansas 66047
linkedintwittertwitter

On Mon, Aug 28, 2017 at 7:23 AM, Uhl, George D. (GSFC-423.0)[SGT INC] <> wrote:

I’ve had the same problem where I’ve run out of disk space to support my Central MA database but I’m getting an odd error and the script is failing:

# /usr/lib/esmond/util/ps_remove_data.py 

cassandra_db [INFO] Checking/creating column families

cassandra_db [INFO] Schema check done

cassandra_db [DEBUG] Opening ConnectionPool

cassandra_db [INFO] Connected to ['localhost:9160']

Error: [Errno 2] No such file or directory: 'p'



# du -h /var/lib/cassandra/data/esmond/

25G/var/lib/cassandra/data/esmond/raw_data

7.6G/var/lib/cassandra/data/esmond/base_rates

4.0K/var/lib/cassandra/data/esmond/stat_aggregations

5.0G/var/lib/cassandra/data/esmond/rate_aggregations

37G/var/lib/cassandra/data/esmond/


# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/vg_archive2-lv_root

                       50G   47G  385M 100% /

tmpfs                 3.9G  4.0K  3.9G   1% /dev/shm

/dev/sda1             477M  167M  285M  37% /boot

/dev/mapper/vg_archive2-lv_home

                       69G   22G   44G  33% /home


Thanks,
George

From: <> on behalf of Casey Russell <>
Date: Wednesday, August 9, 2017 at 5:59 PM
To: "" <>
Subject: [perfsonar-user] Re: Central MA database size snuck up on me

Sorry, I should have mentioned.  Following Andrew's hint, I did go back and look, and because this is a toolkit install, the cron job was installed and running, and should have been running periodically to keep the database from growing out of control.  However, reviewing the logfile at /var/log/perfsonar/clean_esmond_db.log reveals that it has been failing with this error for as far back as my logs go each time it tries to run.  

It had fooled me initially because the "Error: timed out" line doesn't appear as the last line in that log file, it's a few lines up from the bottom, so a cursory review of that logfile looks like it ran cleanly.


Sincerely,
Casey Russell
Network Engineer
KanREN
2029 Becker Drive, Suite 282
Lawrence, Kansas 66047
linkedintwittertwitter

On Wed, Aug 9, 2017 at 4:55 PM, Casey Russell <> wrote:
Group,

     I've now shut down the central MA and more than doubled the size of the Disk (root volume).  So it's no longer a issue of raw space.  But still the ps_remove_data.py won't run to completion.  I get somewhere from 10 to 30 minutes in (it seems to vary) and it ends with something like the following:

Deleted 1 rows for metadata_key=189be3bd15fb482a91f2bfb9524c4473, event_type=histogram-rtt, summary_type=aggregation, summary_window=3600
Sending request to delete 1 rows for metadata_key=189be3bd15fb482a91f2bfb9524c4473, event_type=histogram-rtt, summary_type=statistics, summary_window=3600
Deleted 1 rows for metadata_key=189be3bd15fb482a91f2bfb9524c4473, event_type=histogram-rtt, summary_type=statistics, summary_window=3600
Sending request to delete 11 rows for metadata_key=189be3bd15fb482a91f2bfb9524c4473, event_type=histogram-ttl-reverse, summary_type=base, summary_window=0
Deleted 11 rows for metadata_key=189be3bd15fb482a91f2bfb9524c4473, event_type=histogram-ttl-reverse, summary_type=base, summary_window=0
Sending request to delete 11 rows for metadata_key=189be3bd15fb482a91f2bfb9524c4473, event_type=packet-count-lost-bidir, summary_type=base, summary_window=0
Error: Retried 1 times. Last failure was timeout: timed out

None of these:
/var/log/esmond/esmond.log
/var/log/cassandra/cassandra.log
/var/log/httpd/access_log
/var/log/https/error_log

appear to contain anything interesting when the problem occurs.  I've tried running a manual compaction with nodetool in case there were simply so many tombstones hanging out there that it was causing cassandra or Java/Http a problem in processing, didn't make any difference.  Anyone have any thoughts on anything else I should try (adjusting cassandra config file settings, etc.) before I just delete this database and start it fresh?



Sincerely,
Casey Russell
Network Engineer
KanREN
2029 Becker Drive, Suite 282
Lawrence, Kansas 66047
linkedintwittertwitter

On Wed, Jul 26, 2017 at 10:15 AM, Casey Russell <> wrote:
Group,

     I dug myself a hole and I only see a couple of ways out now.  I wasn't watching the database size on my central MA and my disk utilization is now over 90%.  I've tried using the ps_remove_data.py script several times with several different variations on the config script, but it will invariably end some minutes or hours later with a timeout like this:

Sending request to delete 24 rows for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=histogram-rtt, summary_type=aggregation, summary_window=3600
Deleted 24 rows for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=histogram-rtt, summary_type=aggregation, summary_window=3600
Query error for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=histogram-rtt, summary_type=base, summary_window=0, begin_time=0, expire_time=1485529380
Query error for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=histogram-rtt, summary_type=statistics, summary_window=0, begin_time=0, expire_time=1485529380
Sending request to delete 24 rows for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=histogram-rtt, summary_type=statistics, summary_window=3600
Deleted 24 rows for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=histogram-rtt, summary_type=statistics, summary_window=3600
Query error for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=histogram-ttl-reverse, summary_type=base, summary_window=0, begin_time=0, expire_time=1469545381
Query error for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=packet-count-lost-bidir, summary_type=base, summary_window=0, begin_time=0, expire_time=1469545381
Query error for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=packet-duplicates-bidir, summary_type=base, summary_window=0, begin_time=0, expire_time=1469545503
Sending request to delete 24 rows for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=packet-loss-rate-bidir, summary_type=aggregation, summary_window=3600
Deleted 24 rows for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=packet-loss-rate-bidir, summary_type=aggregation, summary_window=3600
Query error for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=packet-loss-rate-bidir, summary_type=base, summary_window=0, begin_time=0, expire_time=1469545505
Query error for metadata_key=1bdb8f32fe9d4194828d134f37fb37b0, event_type=packet-reorders-bidir, summary_type=base, summary_window=0, begin_time=0, expire_time=1469545509
Sending request to delete 6 rows for metadata_key=1be4b626486c46be88776b3530819ce8, event_type=packet-count-lost, summary_type=base, summary_window=0
Deleted 6 rows for metadata_key=1be4b626486c46be88776b3530819ce8, event_type=packet-count-lost, summary_type=base, summary_window=0
Sending request to delete 6 rows for metadata_key=1be4b626486c46be88776b3530819ce8, event_type=packet-count-lost, summary_type=base, summary_window=0
Error: Retried 1 times. Last failure was timeout: timed out

[root@ps-dashboard esmond]# du -h /var/lib/cassandra/data/esmond/
47G     /var/lib/cassandra/data/esmond/raw_data
4.0K    /var/lib/cassandra/data/esmond/stat_aggregations
9.9G    /var/lib/cassandra/data/esmond/rate_aggregations
13G     /var/lib/cassandra/data/esmond/base_rates
69G     /var/lib/cassandra/data/esmond/

[root@ps-dashboard esmond]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       95G   82G  8.1G  91% /
tmpfs                 3.9G  4.0K  3.9G   1% /dev/shm
/dev/sda1             477M   99M  353M  22% /boot

At the time of the "timeout" as I watch, the disk reaches 100% utilization.  It appears to me that during the deletion of rows, Cassandra/Esmond uses chunks of disk space to store temporary data, and flushes that data.  During the process the disk utilization varies up and down from 91% to 100% until it finally reaches full and the timeout error occurs.

At the end of the failed attempt, even if I restart cassandra, the disk space utilization is approximately what it was before the failed run.  

So, without enough disk space to finish the ps_remove_data.py script, it would appear to me, I have two options.  Delete all my data and start over with a clean database, or shut the machine down and allocate more space to it (it's a VM, but I can't add the space "hot").

Before I take one of those approaches, does anyone else have other ideas or thoughts?

Sincerely,
Casey Russell
Network Engineer
KanREN
2029 Becker Drive, Suite 282
Lawrence, Kansas 66047
linkedintwittertwitter






Archive powered by MHonArc 2.6.19.

Top of Page