system optimization techniques
Yes, I realize BusyBox isn`t for the purpose of reduced size.
I just question it`s seeming general usefulness, and it`s value in Squash based systems.
I have no doubt that there`s a lot more going on with it.
If it`s truly an enhancement then perhaps it should be expanded?
Add in sed, grep, cut, paste, comm, awk, and perhaps even more...
This would "containerize" most of the loose Linux utility files.
I just question it`s seeming general usefulness, and it`s value in Squash based systems.
I have no doubt that there`s a lot more going on with it.
If it`s truly an enhancement then perhaps it should be expanded?
Add in sed, grep, cut, paste, comm, awk, and perhaps even more...
This would "containerize" most of the loose Linux utility files.
Busybox has sed, awk, lpd, vi, fdisk, mkfs, fsck, and so on--it's enough to build the kernel, combined with binutils, gcc, and make. You probably want CONFIG_DESKTOP, though.
I've actually usedit as a full standalone OS.
IIRC, UPX hurts because it ends up killing the self-exec trick or something similar--could be wrong; I remember they mentioned it was NOT good for anything which has multiple instances.
I'd expect Busybox to be an improvement on compressed filesystems due to reduced filesystem io-it self-executes from RAM that is required just to run it, so you don't have it eating up cycles on decompression or cached in ram.
The big space savings (IIRC) was actually in just having one ELF header.
A shared, split Busybox with libbusybox.so was ~6-7 MB in the 1.18 timeline (an interesting config option that is well hidden: enable PIC, then edit .config and uncomment it; I forget the name of the option...)
I've actually usedit as a full standalone OS.
IIRC, UPX hurts because it ends up killing the self-exec trick or something similar--could be wrong; I remember they mentioned it was NOT good for anything which has multiple instances.
I'd expect Busybox to be an improvement on compressed filesystems due to reduced filesystem io-it self-executes from RAM that is required just to run it, so you don't have it eating up cycles on decompression or cached in ram.
The big space savings (IIRC) was actually in just having one ELF header.
A shared, split Busybox with libbusybox.so was ~6-7 MB in the 1.18 timeline (an interesting config option that is well hidden: enable PIC, then edit .config and uncomment it; I forget the name of the option...)
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
The problem with libbusybox.so is that it only exports the <applet>_main functions, not the other functions that could be useful for linking against for creating other apps (I believe this was brought up on the mailing list at some point) ... things like the zlib/bz2/xz, md5/sha1 and other numerous helper functions, but this is likely due to license choice being gpl vs. lgpl - industry isn't usually interested in gpl-ing a major work, but now there is toybox.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
Re: system optimization techniques
Turned it into a shell script (easy) and ran it, it's interesting and usefull, however was wondering if you would be willing to extend it to start from / and test against all installed files and all subdirectorie depths and of course their libraries directories.technosaurus wrote:Wondering whether or not to recompile a program in your puplet to eliminate large shared libs that are only used once or twice
this will tell you how many times each library is needed (if it isn't on the list, it can likely just be removed --- not always though, need to remember dlopen and/or plugins may use it too ... in "module" mode)Code: Select all
for x in ${PATH//://* }/* ; do [ -x "$x" ] && objdump -x $x 2>/dev/null & done|grep NEEDED|sort |uniq -c |sort -n >binaudit
now open binaudit in your text editor and get to work, starting with the ones that are needed only once ... you can build them in statically
It could then become a tool for backtesting a completed build, and fill a void that we don't have now.
As you know, i'm not much of a coder and somedays just thinking is a mental migrane.
thanks
scsijon
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
If you start at /, it will check libs too even if no binaries use them. Waste of time and not useful. Maybe add some from /usr/share and $HOME, but those should really get fixed to be in proper locations.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
You mentioned some tips about portability in thisother thread. There were some good links posted in that thread too. Do you have a summary that could be posted in your subsection at top of this thread?technosaurus wrote:Portability
- potchan
- Posts: 109
- Joined: Sat 05 Apr 2008, 11:46
- Location: Pilots' Height Tel Aviv - Yaffo, Israel ×œ×™× ×•×§×¡_פותחן
- Contact:
System optimization techniques
Hello, I'm Timmo' from http://potchan.org.
My main s(q)fs file is a 3.0G. size CREAMED to 3.8G. to earn about 15 s' in mounting out of total 1.5 min' mounting depends on PC. I find this discussion interesting regarding BIHIHIHIG sqfs needs to be 'educated' in a more manner to ststistically mount the more essentials faster instead of just scanning it. In my humble POV busybox gives a partial-frozen solution to it. Two points to relate to...
1. 's(q)fs' making with new codes: to run the 'naked' basis "/" on desktop partition with some essentials such as network and browser (for instance). The system will acquire it in several plays statistically (best will be thousands times) and then we freeze it into sqfs or sfs which is the basis.
- a possible con of this may be the specific HW coder uses. So we must find the "average politically-correct standard agreed" APCS new negging standard for it, and we as community may compromise a lot doing it right... if "right" is a some absolute value out there...
2. to do the same on "savefile.4fs" or save folder and the user will 'teach' the system according to specific HW and habits on the run, "next time will be faster" in a better way.
Alternatively, we create several of "file.4fs" or save folder on shelf for various users and machines. Not a BarryK vision at all (and not mine at all).
Which one - or which combination - we do better or shorter way ?
My main s(q)fs file is a 3.0G. size CREAMED to 3.8G. to earn about 15 s' in mounting out of total 1.5 min' mounting depends on PC. I find this discussion interesting regarding BIHIHIHIG sqfs needs to be 'educated' in a more manner to ststistically mount the more essentials faster instead of just scanning it. In my humble POV busybox gives a partial-frozen solution to it. Two points to relate to...
1. 's(q)fs' making with new codes: to run the 'naked' basis "/" on desktop partition with some essentials such as network and browser (for instance). The system will acquire it in several plays statistically (best will be thousands times) and then we freeze it into sqfs or sfs which is the basis.
- a possible con of this may be the specific HW coder uses. So we must find the "average politically-correct standard agreed" APCS new negging standard for it, and we as community may compromise a lot doing it right... if "right" is a some absolute value out there...
2. to do the same on "savefile.4fs" or save folder and the user will 'teach' the system according to specific HW and habits on the run, "next time will be faster" in a better way.
Alternatively, we create several of "file.4fs" or save folder on shelf for various users and machines. Not a BarryK vision at all (and not mine at all).
Which one - or which combination - we do better or shorter way ?
- nosystemdthanks
- Posts: 703
- Joined: Thu 03 May 2018, 16:13
- Contact:
Re: System optimization techniques
it isnt like that at all. there is no standard. basically people do whatever they want, and a small portion of that filters up into official this or that.potchan wrote:So we must find the "average politically-correct standard agreed" APCS new negging standard for it, and we as community may compromise a lot doing it right... if "right" is a some absolute value out there...
afterwards, official this or that comes back down and is reused to make about 100 derivatives. maybe its 10. lets say its in that range.
for the most part, this works out. instead of traveling the world to find out what people are running, you can pretty much just download a copy of the setup they like most. its not completely accurate, because some people add features they dont use because "someone else might."
though basically every setup is different, and somewhere between 10 and a 100 users even offer you a copy of theirs for you to try. theres no standard. posix and woof help keep some things familiar. a very practical reinterpretation of your question is to start with your "what do people want" question and simply ask: what would you like to have? then stick that in a distro (you already have-- 12 virtual desktops! fun!) and offer it for people to try. whats missing? what would you like? smaller sfs files? thats doable.
[color=green]The freedom to NOT run the software, to be free to avoid vendor lock-in through appropriate modularization/encapsulation and minimized dependencies; meaning any free software can be replaced with a user’s preferred alternatives.[/color]