Logs Consume a lot of Space

  • 1
  • 1
  • Problem
  • Updated 1 year ago
  • Solved
Dear all, 

One of our VDBs is set to have a 30 days retention for both snapshots and logs. At the moment we're doing a heavy testing and everything is going fine, but logs are consuming a lot of space. I looked around the community and got the idea that we can keep the snapshots retention for 30 days, but change the logs retention for 1 day, which will only prevents us from having the privilege of point-in-time provisioning, which as I understand is a specific point in time in-between two snapshots; ex: Nov 2nd at 9:34 am, please correct me if I'm wrong. This way we can only go-back to a snapshot time; i.e. if taken at 4, 6, and 8 AM then we only can go to these times and no times in-between are possible. 

please correct me if I'm wrong, since logs at the moment are consuming 1/3 of the original DB in less than one week. Thanks. 
Photo of Abdullah alsuwailem

Abdullah alsuwailem

  • 240 Points 100 badge 2x thumb
  • undecided

Posted 1 year ago

  • 1
  • 1
Photo of Matt Watson

Matt Watson, Employee

  • 782 Points 500 badge 2x thumb
You are spot on Abdullah. The Delphix Engine will always keep the archive logs required to recover snapshots, with 1 days archive logs anything older than that will be removed.

The Delphix Engine will also always keep the logs newer than the newest snapshot, regardless of the retention period.
Photo of Abdullah alsuwailem

Abdullah alsuwailem

  • 240 Points 100 badge 2x thumb
Thanks Matt
Photo of Abdullah alsuwailem

Abdullah alsuwailem

  • 240 Points 100 badge 2x thumb
One more question:

Is it possible to delete the logs kept since last week? they're occupying 1.5 TB and I need to remove them as we also changed the logs retention to one day. if yes, please instruct. 
Photo of Matt Watson

Matt Watson, Employee

  • 782 Points 500 badge 2x thumb
For a VDB you have the following options
 - Change the retention on the VDB and Delphix will do it for you.
 - use the Purge Logs option. https://docs.delphix.com/docs/delphix-administration/oracle-environments-and-data-sources/provisioning-vdbs-from-oracle-oracle-rac-and-oracle-pdb-sources/using-the-purgelogs-operation
Photo of Tim Gorman

Tim Gorman, Field Services

  • 2,854 Points 2k badge 2x thumb
Abdullah,

One thing you might consider is either disabling ARCHIVELOG mode in your existing VDBs (i.e. by going into SQL*Plus as SYSDBA, restarting VDB in mount mode, then ALTER DATABASE NOARCHIVELOG), or provisioning future VDBs with ARCHIVELOG mode disabled?

This would of course remove your ability to rewind that VDB between VDB snapshots, or prevision/refresh child VDBs between VDB snapshots, but you can compensate somewhat by taking more frequent VDB snapshots.  The default VDB snapshot policy is daily at 3:30am local time, but you can alter that default policy or add a new VDB snapshot policy that would take VDB snapshots ever couple hours or every hour automatically.  VDB snapshots do not consume much space, and certainly not as much space as archived redo log files do.

So, depending on your requirements, if you don't always need to arbitrary point-in-time recoveries, and if you have a really busy VDB on which there is heavy transaction volume, then you can lighten the workload on the Delphix virtualization engine, and also reduce space consumption by that VDB by running it in NOARCHIVELOG mode, and just increasing the frequency of VDB snapshots.

Please let me know if this makes sense?

Hope this helps!

-Tim