WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Minimizing TCE's disk space  (Read 5009 times)

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Re: Minimizing TCE's disk space
« Reply #15 on: June 29, 2012, 02:00:08 AM »
In reference to the thread subject:
Persistent /home & /opt mode is bound to result in the exact opposite.
Sorry, i'm not sure I understand that last bit.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Minimizing TCE's disk space
« Reply #16 on: June 29, 2012, 02:07:52 AM »
To achieve a goal of minimizing space usage persistent /home and /opt mode has to be avoided (in favour of backup/restore mode).
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11622
Re: Minimizing TCE's disk space
« Reply #17 on: June 29, 2012, 03:03:58 AM »
Hi leekimpark
I'm not sure what the problem is here, du is the tool to use if you want to see how much space is being used
on a drive or in a directory. Your installed size is the sum of the vmlinuz and core.gz files. Anything in the
home and tce directories will be added by you and don't count since they will vary from one individual to
the next. If you don't believe the du command, try this:
Code: [Select]
ls -RShl | lessand add up the sizes of the larger files, there shouldn't be to many files.
What you have is not a frugal install. A frugal install means that your /home and /opt directory are located in
RAM. When you shutdown, you run a backup which compresses the two directories into a file called mydata.tgz
which is saved in your tce directory. When you start up, the file is automatically decompressed and the directories
are restored. This saves disk space, slows booting and shutdown, and gives faster file access. If you lose power,
you lose all changes since the last time you ran a backup. You are running persistent home and opt directories.
This occupies more disk space, gives faster boots and shutdowns, and slower files access. If you lose power, you
only lose what you have not saved in any currently open files.

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Re: Minimizing TCE's disk space
« Reply #18 on: June 29, 2012, 04:10:45 AM »
Hi Rich,
I think there's been a misunderstanding, I have no issues with du, or df, I just ran the former since you asked and was just wondering why a disk space usage listing shows that so much space is being use up. Sorry about that.
Anyways, I was not aware that was how things worked, my understanding of TCL is still very weak. Still, even if persistent home and opt result in more disk space, is it really supposed to be that high, around 75 mb more than a nonpersistent home and opt installation? I mean, there's nothing really inside either directory except for the boot folder...
If that's the case then, is there a more disk space efficient way to achieve persistence of some extensions?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Minimizing TCE's disk space
« Reply #19 on: June 29, 2012, 05:38:57 AM »
Unclear where you derive "around 75 mb more" from.
Evidence provided by you shows that TC takes up 7.7M total.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Minimizing TCE's disk space
« Reply #20 on: June 29, 2012, 05:40:20 AM »
Your df output shows 17mb of file system overhead + 7.7mb of TC files. Both are completely reasonable.
The only barriers that can stop you are the ones you create yourself.

Offline solorin

  • Full Member
  • ***
  • Posts: 184
Re: Minimizing TCE's disk space
« Reply #21 on: June 29, 2012, 06:26:09 AM »
not arguing here.

just curious, what exactly does filesystem overhead constitute?
would that be, for example, the 4k an empty directory takes (summed of course over the many empty directories in the fs)?
perhaps that would clear up the OP's confusion.

also @leekimpark, are you getting the 75mb figure by summing

Quote
/dev/sda1       7.9G   25.6M       7.8G   0%   /mnt/sda1
/dev/sda1       7.9G   25.6M       7.8G   0%   /home
/dev/sda1       7.9G   25.6M       7.8G   0%   /opt

these three records in the df -h output?

i believe those refer the filesystem usage on  /dev/sda1 which /mnt/sda1, /home, /opt all symlink to. IOW, 25.6Mb filesystem usage is referring to the same thing. Someone please correct me if I'm wrong.

cheerio,
solorin
. . . if you don't know, now you know. . .
        ----- R.I.P. Biggie Smalls -----

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Re: Minimizing TCE's disk space
« Reply #22 on: June 29, 2012, 08:22:06 AM »
Like solorin said, I derive the 75mb by summing the three 25.6mb directories. But I remember I booted into the gparted live cd to check disk usage and it was pretty high. Now that I try this again, it gparted gives me a disk usage of about 156 mb, which is really strange. I went into terminal again and mounted /dev/sda1 again and ran du -h on it and it gives me 7.7mb, df -h gives me 26mb which takes into account as people have mentioned filesystem overhead. So I think this whole thing has been my mistake and that tcl's disk usage is as advertised. Sorry for such a stupid error, and thanks for all the help!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Minimizing TCE's disk space
« Reply #23 on: June 29, 2012, 11:33:32 AM »
Quote
just curious, what exactly does filesystem overhead constitute?

Not 100% sure, but I believe it's the journal and other housekeeping tables.
The only barriers that can stop you are the ones you create yourself.