I'm puzzled by the idea of a system being leaner/faster with n copies of a library in physical RAM rather than 1 copy mapped via VMM into whatever process wants it. IIRC this was the main point of shared libraries, not pluggability or changing code during runtime. Am I missing something?
Sta.li: Static Linux
11–20 of 99 posts
Re: Sta.li: Static Linux
#12On binary sizes: > Linking a stripped hello world program with glibc results in 600kb. Linking it with uclibc in about 7kb. That's nice for uclibc, but we're typically linking dynamically. The comparison should be between dynamically and statically linked binaries. A stripped and dynamically linked hello world results in a 6kb program on my machine (glibc). There's also a lot of handwaving on memory usage in the FAQ.
Is that the proportional size (binary size + glibc size / number of things using glibc), or just the size of the binary?
Re: Sta.li: Static Linux
#13On binary sizes: > Linking a stripped hello world program with glibc results in 600kb. Linking it with uclibc in about 7kb. That's nice for uclibc, but we're typically linking dynamically. The comparison should be between dynamically and statically linked binaries. A stripped and dynamically linked hello world results in a 6kb program on my machine (glibc). There's also a lot of handwaving on memory usage in the FAQ.
Totally. Reading the FAQ reminded me of https://xkcd.com/386/
Re: Sta.li: Static Linux
#14On binary sizes: > Linking a stripped hello world program with glibc results in 600kb. Linking it with uclibc in about 7kb. That's nice for uclibc, but we're typically linking dynamically. The comparison should be between dynamically and statically linked binaries. A stripped and dynamically linked hello world results in a 6kb program on my machine (glibc). There's also a lot of handwaving on memory usage in the FAQ.
> A stripped and dynamically linked hello world results in a 6kb program on my machine (glibc). Is that the proportional size (binary size + glibc size / number of things using glibc), or just the size of the binary?
If we add more functionality to the hello world program, the dynamically linked version should increase in size slower than the statically linked.
Re: Sta.li: Static Linux
#15It's an admirable initiative, but I'm pretty sure that at this point sta.li has been in the "design phase" for years. It's vaporware. I'd love to be proven wrong, though.
© 2006-2013 for something still not released certainly isn't promising. Glancing at the git logs ( http://git.suckless.org/?s=idle ) there is some ongoing work, so the project isn't totally dead at least.
Re: Sta.li: Static Linux
#16Lot of fun reading that, I looked around briefly but couldn't find my email archive from Sun, but I was in the kernel group when folks got the idea that "Gee if you shared the text segment of libraries, that would give you more memory for your buffer cache or user pages!" One of the guys in my group re-wrote the linker to scan through and realign text segments so that the maximum number of read-only pages (and thus shareable) could be allocated. And of course code that had static buffers and what not (go look at the 4.1BSD code, they were everywhere). It made my Sun 3/75 which had, wait for it 32 Megabytes of RAM (yes, less than the L2 cache in some machines these days) run quite a bit faster. Took a long time to get right too.
Shared libraries gave you three distinct advantages, one you cut down on the working set size, two you cut down on file load time, and three it became possible to "interpose" on the library and run two versions of the library at the same time for backwards compatibility.
Building a static system might be fun but for a 64 bit system, building one where libraries were fixed in the address space in flash or something might actually be even better.
Re: Sta.li: Static Linux
#17I'm puzzled by the idea of a system being leaner/faster with n copies of a library in physical RAM rather than 1 copy mapped via VMM into whatever process wants it. IIRC this was the main point of shared libraries, not pluggability or changing code during runtime. Am I missing something?
Re: Sta.li: Static Linux
#18"Because dwm is customized through editing its source code, it’s pointless to make binary packages of it. This keeps its userbase small and elitist. No novices asking stupid questions. There are some distributions that provide binary packages though."
Re: Sta.li: Static Linux
#19Earlier quoted context omitted.
> A stripped and dynamically linked hello world results in a 6kb program on my machine (glibc). Is that the proportional size (binary size + glibc size / number of things using glibc), or just the size of the binary?
It's the size of the binary. I don't understand what you mean by proportional size. If we add more functionality to the hello world program, the dynamically linked version should increase in size slower than the statically linked.
When examining memory usage on Linux systems, one of the common measurement metrics is the Proportional Set Size (PSS), which essentially is what I was asking about (but for on-disk size, rather than just in-memory): http://lwn.net/Articles/230975/
Re: Sta.li: Static Linux
#20I'm puzzled by the idea of a system being leaner/faster with n copies of a library in physical RAM rather than 1 copy mapped via VMM into whatever process wants it. IIRC this was the main point of shared libraries, not pluggability or changing code during runtime. Am I missing something?