Mission-Prerna / nl-apis

All the BE APIs to configure, manage & run the NL app
1 stars 16 forks source link

[BE] Audit Prod Storage #287

Closed karntrehan closed 1 month ago

karntrehan commented 2 months ago

We have used 5TB storage space on prod. We need to audit what service is hogging up so much memory and archive some data.

dhruv-1001 commented 2 months ago

@nikhil241 to delete migration backup files files.

karntrehan commented 2 months ago

Backup files deleted by @nikhil241. 5.3TB being used. @Ajay-Maury and @nikhil241 to connect today to analyse this further.

Break of what is using how much space -> App DB, Posthog, UCI, etc..

karntrehan commented 2 months ago

Current storage pattern:

Total size: 7.0TB

Occupied size: 5.5TB

Size left: 1.5TB

Time left: 3 - 5 months

docker-lib ->

AIs:

Post clean-up

Cleanup size: ~3.5TB

New occupied size: ~2.1TB

Free size: ~4.9TB

Time left: ~12 months.

dhruv-1001 commented 2 months ago

@dhruv-1001 @karntrehan @Ajay-Maury to connect on tsdb.

dhruv-1001 commented 2 months ago

@dhruv-1001 @Ajay-Maury to audit and remove duplicate tables. And list out learnings.

TheNPDev commented 2 months ago

4th point cannot be deleted

chinmoy12c commented 2 months ago

Disk Space Utilization Analysis

Final Results

karntrehan commented 2 months ago

WIP. To be closed by 3rd.

nikhil241 commented 2 months ago

To clean up logs in PostgreSQL, we need to write a script and schedule it using a cron job.

dhruv-1001 commented 2 months ago

Actions items.

dhruv-1001 commented 2 months ago

@chinmoy12c to list out what all can be deleted. @chinmoy12c @nikhil241 to connect on cron. Need to delete NL & UCI logs.

nikhil241 commented 1 month ago

A cron job has been set up for Postgres logs for the time being.

dhruv-1001 commented 1 month ago

Current storage pattern:

Total size: 7.0TB

Occupied size: 2.9TB

Size left: 3.8TB

Time left: 9 - 15 months

karntrehan commented 1 month ago

Can be closed post addition.