Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-05-09 Thread Daniel Alvarez
> On 9 May 2018, at 23:32, Ben Pfaff wrote: > > I did the backport a week ago. > Thanks a lot! > Now the logic for compaction is in storage.c, in > ovsdb_storage_should_snapshot(). If you notice any significant > behavioral changes in practice, let me know; I don't think that

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-05-09 Thread Ben Pfaff
I did the backport a week ago. Now the logic for compaction is in storage.c, in ovsdb_storage_should_snapshot(). If you notice any significant behavioral changes in practice, let me know; I don't think that there should be any. On Fri, Apr 27, 2018 at 07:21:32PM +0200, Daniel Alvarez Sanchez

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-04-27 Thread Daniel Alvarez Sanchez
Hi Ben, After [0] got merged the compaction code is not there anymore. How is this being done now? Also, can we get the backport of [1][2] to 2.9 branch? [0] https://github.com/openvswitch/ovs/commit/1b1d2e6daa563cc91f974ffdc082fb3a8b424801 [1]

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-08 Thread Daniel Alvarez Sanchez
Ok, I've just sent a patch and if you're not convinced we can just do the 2x change. Thanks a lot! Daniel On Thu, Mar 8, 2018 at 10:19 PM, Ben Pfaff wrote: > I guess I wouldn't object. > > On Thu, Mar 08, 2018 at 10:11:11PM +0100, Daniel Alvarez Sanchez wrote: > > Thanks Ben and

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-08 Thread Ben Pfaff
I guess I wouldn't object. On Thu, Mar 08, 2018 at 10:11:11PM +0100, Daniel Alvarez Sanchez wrote: > Thanks Ben and Mark. I'd be okay with 2x. > Don't you think that apart from that it can still be good to compact after > a > certain amount of time (like 1 day) if the number of transactions is >

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-08 Thread Daniel Alvarez Sanchez
Thanks Ben and Mark. I'd be okay with 2x. Don't you think that apart from that it can still be good to compact after a certain amount of time (like 1 day) if the number of transactions is > 0 regardless of the size? On Thu, Mar 8, 2018 at 10:00 PM, Ben Pfaff wrote: > It would be

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-08 Thread Daniel Alvarez Sanchez
I agree with you Mark. I tried to check how much it would shrink with 1800 ports in the system: [stack@ovn ovs]$ sudo ovn-nbctl list Logical_Switch_Port | grep uuid | wc -l 1809 [stack@ovn ovs]$ sudo ovn-sbctl list Logical_Flow | grep uuid | wc -l 50780 [stack@ovn ovs]$ ls -alh ovn*.db

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Ben Pfaff
OK. I guess we need to investigate this issue from the basics. On Wed, Mar 07, 2018 at 09:02:02PM +0100, Daniel Alvarez Sanchez wrote: > With OVS 2.8 branch it never shrank when I started to delete the ports since > the DB sizes didn't grow, which makes sense to me. The conditions weren't > met

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Daniel Alvarez Sanchez
With OVS 2.8 branch it never shrank when I started to delete the ports since the DB sizes didn't grow, which makes sense to me. The conditions weren't met for further compaction. See attached image. NB: 2018-03-07T18:25:49.269Z|9|ovsdb_file|INFO|/opt/stack/data/ovs/ovnnb_db.db: compacting

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Daniel Alvarez Sanchez
No worries, I just triggered the test now running OVS compiled out of 2.8 branch (2.8.3). I'll post the results and investigate too. I have just sent a patch to fix the timing issue we can see in the traces I posted. I applied it and it works, I believe it's good to fix as it gives us an idea of

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Ben Pfaff
OK, thanks. If this is a lot of trouble, let me know and I'll investigate directly instead of on the basis of a suspected regression. On Wed, Mar 07, 2018 at 07:06:50PM +0100, Daniel Alvarez Sanchez wrote: > All right, I'll repeat it with code in branch-2.8. > Will post the results once the test

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Daniel Alvarez Sanchez
All right, I'll repeat it with code in branch-2.8. Will post the results once the test finishes. Daniel On Wed, Mar 7, 2018 at 7:03 PM, Ben Pfaff wrote: > On Wed, Mar 07, 2018 at 05:53:15PM +0100, Daniel Alvarez Sanchez wrote: > > Repeated the test with 1000 ports this time. See

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Ben Pfaff
On Wed, Mar 07, 2018 at 05:53:15PM +0100, Daniel Alvarez Sanchez wrote: > Repeated the test with 1000 ports this time. See attached image. > For some reason, the sizes grow while deleting the ports (the > deletion task starts at around x=2500). The weird thing is why > they keep growing and the

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Daniel Alvarez Sanchez
Right, thanks Mark! Good point about the 4x, I missed that one. I'm repeating the test for 1K ports. Not sure if I'll be able to reproduce the 2.5GB part but it is still weird that while deleting ports (actually deleting stuff from the DB) it doesn't get to compact the DB further (last time it

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Mark Michelson
On 03/07/2018 07:40 AM, Daniel Alvarez Sanchez wrote: Hi folks, During the performance tests I've been doing lately I noticed that the size of the Southbound database was around 2.5GB in one of my setups. I couldn't dig further then but now I decided to explore a bit more and these are the

Re: [ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Daniel Alvarez Sanchez
BTW, I didn't spot any of these messages in the log: https://github.com/openvswitch/ovs/blob/4cc9d1f03f83e9fac90a77ddaca0af662b2758b1/ovsdb/file.c#L615 I'll add a few traces to figure out why the auto compact is not triggering. Also, I could see the trace when I ran it manually:

[ovs-discuss] OVN Database sizes - Auto compact feature

2018-03-07 Thread Daniel Alvarez Sanchez
Hi folks, During the performance tests I've been doing lately I noticed that the size of the Southbound database was around 2.5GB in one of my setups. I couldn't dig further then but now I decided to explore a bit more and these are the results in my all-in-one OpenStack setup using OVN as a