Community discussions

MikroTik App
 
User avatar
dissident76
just joined
Topic Author
Posts: 10
Joined: Fri Apr 10, 2015 7:33 am

Dude vacuum-db BUG / trivial feature request

Wed Nov 10, 2021 12:08 am

Dude command
/dude vacuum-db

won't work on a RB750Gr3 even with a small sized db (anything over 10MB). Router only has like 16MB of internal space, so it runs out of space when trying to do the vacuum, as it uses internal storage for the operation, instead of the SD card, where the DB is stored. Can you please either make the vacuum-db command work on the same directory where dude is configured to store the db, or even more flexible add a parameter to the vacuum-db command to specify where it should store the temp copy?

Thanks

All devices running 6.49
dude database on "~sd/dude" directory
"~sd" is the mount path for SD card
Last edited by dissident76 on Wed Nov 10, 2021 2:14 pm, edited 1 time in total.
 
eddieb
Member
Member
Posts: 327
Joined: Thu Aug 28, 2014 10:53 am
Location: Netherlands

Re: Dude vacuum-db BUG / trivial feature request

Wed Nov 10, 2021 9:21 am

Hi,
I am running dude on a RB750Gr3 for a couple of years now.
db is on a 64GB sd card and I never had problems running vacuum-db ...
db is approx 550MB
 
User avatar
dissident76
just joined
Topic Author
Posts: 10
Joined: Fri Apr 10, 2015 7:33 am

Re: Dude vacuum-db BUG / trivial feature request

Wed Nov 10, 2021 2:32 pm

Hi,
I am running dude on a RB750Gr3 for a couple of years now.
db is on a 64GB sd card and I never had problems running vacuum-db ...
db is approx 550MB
Hi, thanks for your reply.
Have you actually monitored the available space on internal storage when running vaccum-db? Does yours go to 0% before vacuum-db stops?

In my case, I assume vacuum-db uses internal storage -even though I'm not sure, cause can't see any new file created- because during the vacuum-db process it goes all the way down to 0% free space on internal (screenshot below from the moment it was on 2%, but it did go to 0%). And after that, dude gets enabled again without any error message, but the db does not seem to be vacuumed at all (no size change, when I know it should shrink a lot after changing the "Raw Value Keep Time" setting to a much lower value).

If I copy the dude DB to my PC and vacuum it with DBBrowser for SQLite v3.12.2, it does get vacuumed with a very significant size change after lowering "Raw Value Keep Time" setting. Last time it went from 289Mb to 89MB when vacuuming with DBBrowser on PC, but no change at all in size with RouterOS vacuum-db (only thing that seems to happen in Router OS vacuum-db is available space on internal storage goes to 0% and then suddenly it goes back to the usual 29%)

Which means If I want the db to shrink after a "Raw Value Keep Time" setting change, I have to disable dude, download the db from the router to my PC, vacuum-db with DBBrowser, upload back to the router and re-enable dude.

Have you checked that vacuum actually does anything to your db (significant size change after setting changes, etc)?

Thanks
Screenshot 2021-11-10 213049.jpg
You do not have the required permissions to view the files attached to this post.
 
eddieb
Member
Member
Posts: 327
Joined: Thu Aug 28, 2014 10:53 am
Location: Netherlands

Re: Dude vacuum-db BUG / trivial feature request

Wed Nov 10, 2021 3:23 pm

Hi,

I just ran vacuum-db ...
it completed within 20 seconds. I did not see the free space move ...
Screenshot 2021-11-10 at 13.41.53.png
as I make a daily backup of my dude db to a remote server, it is also vacuumed every day as part of that procedure ...
I did not see a noticible change in size of the DB ...
Screenshot 2021-11-10 at 14.22.07.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
dissident76
just joined
Topic Author
Posts: 10
Joined: Fri Apr 10, 2015 7:33 am

Re: Dude vacuum-db BUG / trivial feature request

Thu Nov 11, 2021 12:10 am

Hi,

I just ran vacuum-db ...
it completed within 20 seconds. I did not see the free space move ...
Screenshot 2021-11-10 at 13.41.53.png

as I make a daily backup of my dude db to a remote server, it is also vacuumed every day as part of that procedure ...
I did not see a noticible change in size of the DB ...

Screenshot 2021-11-10 at 14.22.07.png
Thanks for doing that. Well there's definitely a difference there, regarding the space.

The db will not normally change size when vacuuming -only when there is quite some space to reclaim, like after changing the settings for how many times you poll and how long you keep that data, etc. So I would not expect to see a size change on a routine vacuum

Who is online

Users browsing this forum: anav, Google [Bot] and 84 guests