Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
code size too large
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
funky1096
n00b
n00b


Joined: 10 Oct 2013
Posts: 47

PostPosted: Fri Oct 11, 2013 3:30 pm    Post subject: code size too large Reply with quote

I installed gentoo and xorg, lxde, and wpa_supplicant with "-pipe -march=native -O2" in /etc/portage/make.conf and my size on disk is 2.1GB but the actual size is 22gb or so. why is that and is there a way to reduce code size besides replacing -O2 with -Os and reinstalling?
Back to top
View user's profile Send private message
nemectic
Apprentice
Apprentice


Joined: 20 Aug 2004
Posts: 182

PostPosted: Fri Oct 11, 2013 3:41 pm    Post subject: Reply with quote

Sorry, what are you using to find out those sizes? That sounds like you're using windows to look at drive properties and you have a 22gb partition or something?
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Fri Oct 11, 2013 3:44 pm    Post subject: Reply with quote

@funky1096:
What do you mean by "my size on disk" and "actual size"? Also, I don't think you can gain much disk space by switching from -O2 to -Os. I suggest you to stick to -O2 unless you have special requirements.
Back to top
View user's profile Send private message
nemectic
Apprentice
Apprentice


Joined: 20 Aug 2004
Posts: 182

PostPosted: Fri Oct 11, 2013 3:45 pm    Post subject: Reply with quote

Can you post the output of:

Code:
df -h


Just run that command in the shell and it'll give you a nice table of disk usage.
Back to top
View user's profile Send private message
funky1096
n00b
n00b


Joined: 10 Oct 2013
Posts: 47

PostPosted: Fri Oct 11, 2013 3:48 pm    Post subject: Reply with quote

nemectic wrote:
Sorry, what are you using to find out those sizes? That sounds like you're using windows to look at drive properties and you have a 22gb partition or something?


im using PCManFM to find out size, it lists size on disk as 2.1gb and actual size as 22gb or so. I have a 80gb EXT4(windows cant read that natively) disk partition all of these files are in along with a 1gb partition dedicated to /boot. Is there a command line way to find out disk space?
Back to top
View user's profile Send private message
nemectic
Apprentice
Apprentice


Joined: 20 Aug 2004
Posts: 182

PostPosted: Fri Oct 11, 2013 3:51 pm    Post subject: Reply with quote

Code:
df -h


I posted above, you must have missed it :D
Back to top
View user's profile Send private message
nemectic
Apprentice
Apprentice


Joined: 20 Aug 2004
Posts: 182

PostPosted: Fri Oct 11, 2013 3:54 pm    Post subject: Reply with quote

Just done a quick search and it seems that the disk usage reported from pcmanfm has been broken for a long time.
Back to top
View user's profile Send private message
funky1096
n00b
n00b


Joined: 10 Oct 2013
Posts: 47

PostPosted: Fri Oct 11, 2013 4:01 pm    Post subject: Reply with quote

I had to type this out still waiting on chromium compile :[

Rootfs 58GB 8.3GB. 47Gb 16% /
Udev 10M 4.0k. 10M. 1%. /dev
/dev/sda3 58GB 8.3GB. 47Gb 16% /
Tmpfs. 2.0GB. 492k. 2.0GB. 1%. /run
Shm. 2.0GB. 0. 2.0GB. 0%. /dev/shm
Cgroup_root 10m. 0. 10m. 0%. /sys/fs/cgroup

Auto correct is annoying FYI.

Why did my 80GB partition of ext4 become 58GB? And why is only 8.3GB shown as used(ie I was expecting much smaller due to my previous use of lubuntu).
Back to top
View user's profile Send private message
nemectic
Apprentice
Apprentice


Joined: 20 Aug 2004
Posts: 182

PostPosted: Fri Oct 11, 2013 4:13 pm    Post subject: Reply with quote

Code:
gdisk -l /dev/sda


Or, if you don't have gdisk:

Code:
fdisk -l


If you're checking disk space while compiling, unless you have portage set up to compile in ram, it will appear you're using much more disk than you really are (for big compiles like chromium anyway). You'll be better re-checking once you're done emerging.

[edited] Missed out part of the first command.

I'm off out anyway, I'm sure someone else will pick this up. Have a nice weekend!
Back to top
View user's profile Send private message
funky1096
n00b
n00b


Joined: 10 Oct 2013
Posts: 47

PostPosted: Sat Oct 12, 2013 4:36 pm    Post subject: Reply with quote

its ok now after all the compiling it is at 5.9GB. and also fdisk -l

Code:

isk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9cf9e717

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     3074047     1536000   27  Hidden NTFS WinRE
/dev/sda2   *     3074048   853889023   425407488    7  HPFS/NTFS/exFAT
/dev/sda3       853889024   976773167    61442072   83  Linux

Disk /dev/sdb: 1015 MB, 1015808000 bytes, 1984000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1             249     1983743      991747+   6  FAT16


still confused why 80GB goes into 59GB
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sat Oct 12, 2013 8:34 pm    Post subject: Reply with quote

976773167 - 853889024 +1 = 122884144 sectors

122884144 x 512 = 62916681728 bytes

62916681728 / 1024 = 61442072 ko

61442072 / 1024 = 60002 mo

60002 / 1024 = 58 go

At the power of 1000 it give 62 go. So your root filesystem size reflect exactly the size of the partition it have been created in, /dev/sda3.
_________________
Paul
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Sat Oct 12, 2013 9:00 pm    Post subject: Reply with quote

funky1096,

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda3       853889024   976773167    61442072   83  Linux


So your sda/3 is 61442072*1024 bytes. There is a mix of Decimal and Binary units there.
In bytes, its 62916681728 or 62.916681728 Salesmans Gb.
In real binary GBi, its 59.1735931336

Thats your empty partition.
df says
Code:
Rootfs 58GB 8.3GB. 47Gb 16% /
which is real binary GBi and its less than the 59.1Gbi above as Ext4 needs to space to save data about your data, so it can find your files.

That all looks fairly normal.

Further, df run as root and df run as a normal user will produce different results as extX reserves 5% (by default) of the filesystem for root.
The 5% may be excessive with hard drive sizes today but the reserved space is a very good thing. It prevents normal users from crashing the system by filling up root.
Horrible things happen when the system can no longer write PID files, lock files and/or logs. You can't even reboot.

I don't see any 80G partiton.

-- edit --

Logicien,

heh - the same arithmetic from a different starting point.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum