Db flood by maas event log


#1

Our database have 6+GB, 1200w+ lines of maas event in database.
48%20PM
I’m suspecting that this is the real cause of machine listing issue (see Updated to 2.6 from 2.5 now UI slow and not usable and https://bugs.launchpad.net/maas/+bug/1835316)

I saw that there was a similar issue and mark resolved https://bugs.launchpad.net/maas/+bug/1403080
not sure it’s a regression or we should let this table grow?

Can the data inside be safely deleted?


Updated to 2.6 from 2.5 now UI slow and not usable
#2

Following the @hyuwang question… Is there any garbage collector for the DB? There are tons of old events/data there


#3

We don’t have any garbage collection at the moment but are discussing ideas.

It’s safe to truncate this table, assuming you no longer care about historical events.


#4

IMHO, having such a large number of events shouldn’t be a case of performance issues because the UI shouldn’t even try to load all of them. In fact, it should be only loading:

  1. The latest event on the machine listing page per machine, if any.
  2. The first few events on a details page.

So I believe this has already been fixed on the UI perspective?


#5

ya, problem gone after merge the UI fix


#6

sorry, let me put my words back. just a few days after the truncation, our table once again grow up to 500M+ rows, and everything become slow again.
the problem still exists after the UI fix, I found some extremely complex query which join multiple table with maasserver_event. See the detail in my other post here Updated to 2.6 from 2.5 now UI slow and not usable