[SERVER-16229] Executable file sizes much larger than 2.6 when not stripped Created: 18/Nov/14  Updated: 19/Nov/14  Resolved: 19/Nov/14

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Thijs Cadier Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Compile core executables.

Participants:

 Description   

The file sizes of the core executables are much larger than in earlier releases, in my environment on Ubuntu 14.04:

150M mongo
384M mongobridge
390M mongod
383M mongoperf

Is this expected of a RC build?



 Comments   
Comment by Thijs Cadier [ 19/Nov/14 ]

Thanks, works like a charm. One for the docs I guess?

6.4M	bsondump
11M	mongo
21M	mongobridge
21M	mongod
6.7M	mongodump
6.6M	mongoexport
6.6M	mongofiles
6.7M	mongoimport
6.4M	mongooplog
21M	mongoperf
6.8M	mongorestore
16M	mongos
6.6M	mongostat
6.5M	mongotop

Comment by Scott Hernandez (Inactive) [ 19/Nov/14 ]

Looks like your files aren't strip'd. If you strip the binaries the file sizes on your custom build will match the mongodb release binaries. Without striping the files contain debug symbols and other diagnostic information.

Example:

strip mongod

Comment by Thijs Cadier [ 19/Nov/14 ]

These are the executable sizes of 2.6.5, compiled on the same machine with the same scons command. So there does seem to be a big difference? I'm compiling with: scons core -j 8 --64 --ssl --cc=gcc-4.7 --cxx=g++-4.7

19M	bsondump
11M	mongo
19M	mongod
19M	mongodump
19M	mongoexport
19M	mongofiles
19M	mongoimport
19M	mongooplog
19M	mongoperf
19M	mongorestore
15M	mongos
19M	mongostat
19M	mongotop

Comment by Ramon Fernandez Marina [ 19/Nov/14 ]

thijs, which exact versions are you comparing? Also, what tarballs/packages did you use to install those versions?

I'm asking because I don't see larger sizes than 2.6.5 – in fact executable sizes for 2.8.0-rc0 are smaller than in 2.6.5:

- mongo
   text    data     bss     dec     hex filename
11471980         403360  177968 12053308         b7eb3c 2.6.5/bin/mongo
   text    data     bss     dec     hex filename
10675691         373304  220768 11269763         abf683 2.7.8/bin/mongo
   text    data     bss     dec     hex filename
11260693         393400  220800 11874893         b5324d 2.8.0-rc0/bin/mongo
 
- mongod
   text    data     bss     dec     hex filename
23098182         539552  213992 23851726        16bf2ce 2.6.5/bin/mongod
   text    data     bss     dec     hex filename
19479393         509264  266800 20255457        13512e1 2.7.8/bin/mongod
   text    data     bss     dec     hex filename
21815598         564080  269760 22649438        1599a5e 2.8.0-rc0/bin/mongod
 
- mongoperf
   text    data     bss     dec     hex filename
22779212         536040  212104 23527356        166ffbc 2.6.5/bin/mongoperf
   text    data     bss     dec     hex filename
19270367         506032  265328 20041727        131cfff 2.7.8/bin/mongoperf
   text    data     bss     dec     hex filename
21595335         560440  268288 22424063        15629ff 2.8.0-rc0/bin/mongoperf

Generated at Thu Feb 08 03:40:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.