[Problem] Sector size

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

[Problem] Sector size

by Krock » Mon Dec 30, 2013 20:45

100 words in one image:
Image

I know, I'm a minimalist, but wouldn't there be a way to put the media inside a *.tar (uncompressed file) file to have no waste of useful disk space?

Same with the texture packs. I have alot space left but this is like "gravel in the shoes".
I saw, the formatting Ext4 has a culster size of 512KB, that would make this folder about 3441664KB (3.44GB) big!

EDIT: googled it.. It's 512 Bytes :3
Last edited by Krock on Mon Dec 30, 2013 21:45, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Mon Dec 30, 2013 21:12

Krock wrote: saw, the formatting Ext4 has a culster size of 512KB, that would make this folder about 3441664KB (3.44GB) big!

You don't know how sectors work, do you?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Mon Dec 30, 2013 21:42

sfan5 wrote:
Krock wrote: saw, the formatting Ext4 has a culster size of 512KB, that would make this folder about 3441664KB (3.44GB) big!

You don't know how sectors work, do you?

Well, I think they're called sector, 90% sure.
Something gets written into one of them and if the file is bigger than 512KB, it starts using a new sector and writes into that one. If only 1 byte gets written into it, it gets used and gets unuseable for other files.

Or am I totally wrong with this? How else to explain this amout of taken HDD space?

EDIT: okay I got a totally cobbly size of 128 KB, need to format it another way.
Case closed
Last edited by Krock on Mon Dec 30, 2013 21:50, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Mon Dec 30, 2013 21:51

Krock wrote:
sfan5 wrote:
Krock wrote: saw, the formatting Ext4 has a culster size of 512KB, that would make this folder about 3441664KB (3.44GB) big!

You don't know how sectors work, do you?

Well, I think they're called sector, 90% sure.
Something gets written into one of them and if the file is bigger than 512KB, it starts using a new sector and writes into that one. If only 1 byte gets written into it, it gets used and gets unuseable for other files.

Or am I totally wrong with this? How else to explain this amout of taken HDD space?

EDIT: okay I got a totally cobbly size of 128 KB, need to format it another way.
Case closed

How did you come to the conclusion that ext4 would make the folder ~3GB big on disk?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Mon Dec 30, 2013 21:58

sfan5 wrote:How did you come to the conclusion that ext4 would make the folder ~3GB big on disk?

I readed somewhere the minimal size would be 512 KB but I figured out, it's actually 512 Bytes.
So I calculated 512 * 6722 (files) and I got 3 GB.
Sorry for that confusion with this theme.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Mon Dec 30, 2013 23:39

this is called slack space.

to make a long story short :

defragment your drive.

about using tarred/zipped idea:

its a good idea generally, but would trade space for speed.

otoh i believe you can set the clustering size of your filesystem to have less slack.
cant elaborate more because i lack a keyboard
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Tue Dec 31, 2013 09:09

Krock wrote:
sfan5 wrote:How did you come to the conclusion that ext4 would make the folder ~3GB big on disk?

I readed somewhere the minimal size would be 512 KB but I figured out, it's actually 512 Bytes.
So I calculated 512 * 6722 (files) and I got 3 GB.
Sorry for that confusion with this theme.

You calculated how big 6722 of 512KB files would be, this has nothing to do with sectors.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Tue Dec 31, 2013 18:07

Hybrid Dog wrote:The mods and texture packs of wz2100 are saved into archives.


Err.. wut?
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Wed Jan 01, 2014 18:04

wz2100 = Warzone 2100 - free and open-source real time strategy game.
Pretty neat game if you ask me, but I'm not a fan of RTS.

----------------------------------------------------------------------------

Am I wrong if I say that supposing a sector has a size of 8 B, and I have a 1 B file, then does the 1 B file take up 8 B on disk?
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Wed Jan 01, 2014 18:15

hoodedice wrote:Am I wrong if I say that supposing a sector has a size of 8 B, and I have a 1 B file, then does the 1 B file take up 8 B on disk?

No, it's true but I've no idea how and why they are needed...yet
Going to use wikipedia once again.
Last edited by Krock on Wed Jan 01, 2014 18:16, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Wed Jan 01, 2014 18:16

hoodedice wrote:Am I wrong if I say that supposing a sector has a size of 8 B, and I have a 1 B file, then does the 1 B file take up 8 B on disk?


no, you are not.

actually the 1 byte file would occupy way more than a sector (512 bytes), depending on the cluster/node size of the file-system.

all file-systems have this overhead, usually called slack space.

a related concept is fragmentation, and again all file-systems suffer from fragmentation,ex.: fat32 more than zfs or ext4. but even ext4 has his fragmentation level.

ntfs, despite commom sense can get quite fragmented too.

its common assumption that fragmentation can ake slack worse.(though ive never seen a conclusive explanation)

otw: most systems allow selecting file-system wide clustering/node size to match usage.

otw2: im using touch, its hard to type
Last edited by aldobr on Wed Jan 01, 2014 18:23, edited 1 time in total.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 6 guests

cron