Author Topic: DB ate my Hard Drive!  (Read 4570 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
DB ate my Hard Drive!
« on: January 25, 2010, 04:02:16 AM »
In a spring cleaning of my system, I found out that the DB folder, which I had previously assumed to be of negligible size, had eaten up 2GB of my hard drive! Deleting and zipping simulations cut this down to about 35MB, but still raises an issue. Is there any way to save simulations so they don't take up a huge amount of space? I ask as it strikes me as some part of the original spaghetti code that nobody's been willing to touch for years. (And I won't blame you for avoiding it   )
« Last Edit: January 25, 2010, 04:02:44 AM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DB ate my Hard Drive!
« Reply #1 on: January 25, 2010, 12:30:37 PM »
Yes, we could include something that zipped the simulations before saving them to disk.  It would probably make saving faster as well, since usually zipping is faster bytes/sec-wise than disk access.  But we'd need to find some way to hook our VB6 code in to a compression library, which isn't trivial.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
DB ate my Hard Drive!
« Reply #2 on: January 25, 2010, 04:51:50 PM »
I was thinking more in the direction of saving simulation parameters seperately as they usually stay the same between saves and things like that, but sure, whatever works...
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DB ate my Hard Drive!
« Reply #3 on: January 25, 2010, 07:17:05 PM »
It's the DNA and mutation details that take up most of the space.  The simulation details are like 512 byes, if that.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
DB ate my Hard Drive!
« Reply #4 on: January 25, 2010, 09:04:19 PM »
Quote from: Numsgil
It's the DNA and mutation details that take up most of the space.  The simulation details are like 512 byes, if that.

Maybe making the mutation details optional, then? After a few dozen generations, they are usually too hard to keep track of anyway.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DB ate my Hard Drive!
« Reply #5 on: January 26, 2010, 01:54:29 AM »
They are currently, actually.  "Save without mutation details".

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
DB ate my Hard Drive!
« Reply #6 on: January 26, 2010, 02:30:06 PM »
Oh...  
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
DB ate my Hard Drive!
« Reply #7 on: January 27, 2010, 07:00:41 AM »
Why do the mutation details take up so much space? It seems like each one is kind of small like, on cycle w mutation x changed bp y to bp z. Thats four variables.

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
DB ate my Hard Drive!
« Reply #8 on: January 27, 2010, 07:24:58 AM »
Save last 10 only ?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
DB ate my Hard Drive!
« Reply #9 on: January 27, 2010, 12:41:26 PM »
Quote from: Houshalter
Why do the mutation details take up so much space? It seems like each one is kind of small like, on cycle w mutation x changed bp y to bp z. Thats four variables.

They're stored as full strings.  They don't have to be, just no one ever did them differently.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
DB ate my Hard Drive!
« Reply #10 on: January 27, 2010, 11:06:12 PM »
Quote from: ikke
Save last 10 only ?
I always turn this option on but apparently not. My guess is that new sims don't overwrite other sims.
« Last Edit: January 27, 2010, 11:06:36 PM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
DB ate my Hard Drive!
« Reply #11 on: January 30, 2010, 02:34:29 AM »
Quote from: bacillus
[My guess is that new sims don't overwrite other sims.
The chek would be to save a sim every minute, start a new one every hour and see what happens