LWN: Comments on "Our bloat problem" https://lwn.net/Articles/146131/ This is a special feed containing comments posted to the individual LWN article titled "Our bloat problem". en-us Mon, 06 Oct 2025 05:14:19 +0000 Mon, 06 Oct 2025 05:14:19 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net 8 byte characters? https://lwn.net/Articles/148501/ https://lwn.net/Articles/148501/ miallen <i>Many apps use UCS-2 internally, because it's *MUCH* faster to work with for many things than UTF-8 .</i> <p> I donno about that. First, it is a rare thing that you would say "I want 6 *characters*". The only case that I can actually think of would be if you were printing characters in a terminal which has a fixed number of positions for characters. In this case UCS-2 is easier to use but even then I'm not convinced it's actually faster. It your using Cyrillic, yeah, it will probably be faster but if it's 90% ascii I would have to test that. Consider that UTF-8 occupies almost half the space of UCS-2 and that CPU cache misses account for a LOT of overhead. If you have large collections of strings like from say a big XML file the CPU will do a lot more of waiting for data with UCS-2 as opposed to UTF-8. <p> In truth the encoding of strings is an ant compared to the elephant of data structures and algorithms. If you design your code well and adapt interfaces so that modules can be reused you can improve the efficiency of your code much more than petty compiler options, changing character encodings, etc. Sat, 20 Aug 2005 06:24:35 +0000 Our bloat problem https://lwn.net/Articles/148282/ https://lwn.net/Articles/148282/ oak <font class="QuotedText">&gt; Aggregating this stuff into a snapshot of the whole system at a point in </font><br> <font class="QuotedText">&gt; time would let you really point fingers in terms of bloat and figure out </font><br> <font class="QuotedText">&gt; where to concentrate efforts. </font><br> <br> If the patch Robert mentioned is the same which results I have seen <br> (post-processed), you can already get that information from Linux kernel <br> by patching it a bit. The results I saw included machine wide statistics <br> and process specific stats of how many pages reserved for the process were <br> ro/rw/dirty, how much each linked library accounts for the process memory <br> usage (relocation table sizes etc., not how much each library allocates <br> heap for the process[1]). This is quite useful for system overview, <br> whereas valgrind/Massif/XResTop/top tell enough of individual <br> applications. <br> <br> [1] that you can get just with a simple malloc wrapper that gets stack <br> traces for each alloc and some data post-processing heuristics to decided <br> which item in the stack trace to assign the guilt. The hard part is <br> actually the post-processing, deciding who in e.g. the allocation chain of <br> App-&gt;GtkLabel-&gt;Pango-&gt;Xft2-&gt;FontConfig-&gt;Freetype should be blamed for the <br> total of the allocations done at any point in the chain as you don't know <br> whether the reason for the total allocations is valid or not without <br> looking at the code... <br> <br> Best would be an interactive allocation browser similar to Kcachegrind <br> with which one could view also the source along with accumulated <br> allocation percentages. <br> <br> Thu, 18 Aug 2005 20:10:32 +0000 8 byte characters? https://lwn.net/Articles/147397/ https://lwn.net/Articles/147397/ hp Unicode doesn't fit in 16 bits anymore; most apps using 16-bit encodings would be using UTF-16, which has the same variable-length properties as UTF-8. If you pretend each-16-bits-is-one-character then either you're using a broken encoding that can't handle all of Unicode, or you're using UTF-16 in a buggy way. To have one-array-element-is-one-character you have to use a 32-bit encoding.<br> <p> UTF-8 has the huge advantage that ASCII is a subset of it, which is why everyone uses it for UNIX.<br> <p> Sat, 13 Aug 2005 02:53:30 +0000 shared libraries [ab]use https://lwn.net/Articles/147387/ https://lwn.net/Articles/147387/ dag- Every Gnome user interested in a clock was secretly running a complete evolution client ? I don't think this is funny. Really. Who's bright idea was this ? And everybody agreed to that ?<br> Fri, 12 Aug 2005 23:53:33 +0000 It's about time... https://lwn.net/Articles/147383/ https://lwn.net/Articles/147383/ obi Well, unlike OpenOffice Abiword and Gnumeric feel very light. Opening an Excel file in Gnumeric has _never_ failed for me (in my personal experience, 100% compatible - maybe I haven't used difficult documents enough), and on my 800mhz machine startup is nearly instant. Abiword is a bit less compatible with Word than I'd like it to be, but it's definitely usable, produces very nice output in XHTML, is kept simple - nice!<br> <p> (BTW Inkscape/GIMP start up in a fraction of the time needed for their commercial counterparts - which might have a bit more features, but I seriously doubt a lot of people use them)<br> <p> Just to mention that it's not all bad.<br> <p> Fri, 12 Aug 2005 23:28:26 +0000 anti-bloating microsoft docs https://lwn.net/Articles/147309/ https://lwn.net/Articles/147309/ astrophoenix my friend was writing her Ph.D. dissertation in microsoft word. now that she has to get it formatted to pass the university, I'm helping her convert it to LaTeX (we found a LaTeX class for her university to handle the formatting). the first step was to filter the .doc through <a rel="nofollow" href="http://www.winfield.demon.nl/">antiword</a>, producing a nice ascii file. even the tables came out nice. her 400 page .doc file was converted to ascii so fast that I wasn't sure it worked at first! Fri, 12 Aug 2005 15:55:21 +0000 Our bloat problem https://lwn.net/Articles/147308/ https://lwn.net/Articles/147308/ astrophoenix check out <a rel="nofollow" href="http://www.isi.edu/~johnh/SOFTWARE/LAVAPS/">lavaps</a> Fri, 12 Aug 2005 15:32:52 +0000 libraries https://lwn.net/Articles/147297/ https://lwn.net/Articles/147297/ ringerc Actually, as far as I know a well written lib won't have much non-read-only static data (so it can be shared efficiently), and should incur only a very small memory overhead for any unused portions. If I recall correctly unused parts of the library aren't even read from disk.<br> <p> There are many things to complain about with shared libraries, but their on-disk size is not one of them unless you're building embedded systems. If you are, you can build a cut down version of most libraries quite easily.<br> Fri, 12 Aug 2005 14:03:08 +0000 gcc4's -fvisibility=hidden https://lwn.net/Articles/147296/ https://lwn.net/Articles/147296/ ringerc Support for this should be *REALLY* easy to add to a library that works under win32, or an app that already supports plug-ins under win32. You can piggyback the required attribute directives on the win32 export macros.<br> <p> It does help, and is well worth doing since in many cases it won't require much more than tweaking the export macros in a header, then scratching together some more m4 macros for your configure scripts.<br> Fri, 12 Aug 2005 13:58:29 +0000 LTSP https://lwn.net/Articles/147295/ https://lwn.net/Articles/147295/ ringerc My experience with LTSP at work is that the KDE and XFCE desktops both use minimal RAM. KDE seems to use a scarily small amount of additional RAM per instance after the first one - good use of static read only data etc I suspect.<br> <p> OO.o, firefox, and Evolution, however, are lethal. Evolution in particular uses awe-inspiring amounts of RAM when working with large IMAP mailboxes. I've clocked it at &gt; 250MB.<br> <p> GNOME doesn't seem to be too bad with RAM use either. It looks a lot like the real issue is the apps.<br> Fri, 12 Aug 2005 13:55:30 +0000 8 byte characters? https://lwn.net/Articles/147292/ https://lwn.net/Articles/147292/ ringerc Many apps use UCS-2 internally, because it's *MUCH* faster to work with for many things than UTF-8 . With utf-8, to take the first 6 characters of a buffer you must decode the UTF-8 data (you don't know if each character is one, two, or four bytes long). With UCS-2, you just return the first 12 bytes of the buffer.<br> <p> That said - it's only double. For text, that's not a big deal, and really doesn't explain the extreme memory footprints we're seeing.<br> Fri, 12 Aug 2005 13:45:56 +0000 Our bloat problem https://lwn.net/Articles/147132/ https://lwn.net/Articles/147132/ anton <blockquote><em>I don't see why program would allocate memory without writing to it</em></blockquote> I do this when I need contiguous memory, but don't know how much. Then I allocate lots of space; unused memory is cheap. The result looks like this: <pre> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND anton 17100 0.0 0.2 6300 1196 pts/0 S+ 14:16 0:00 gforth </pre> The large VSZ is caused mainly by unused allocated memory. <p>So if you want to know the real memory usage, counting private anonymous mappings is not good enough. Thu, 11 Aug 2005 12:24:44 +0000 Unshared memory usage https://lwn.net/Articles/147098/ https://lwn.net/Articles/147098/ sholden pmap 2430 | awk '/rw/ {total += $2}; END {print total}'<br> <p> Thu, 11 Aug 2005 05:16:17 +0000 Unshared memory usage https://lwn.net/Articles/146718/ https://lwn.net/Articles/146718/ daniel pmap 2430 | grep rw | awk '{total += $2}; END {print total}'<br> <p> Bloat must be hunted down and exterminated wherever it is found :-)<br> Tue, 09 Aug 2005 04:22:27 +0000 Our bloat problem https://lwn.net/Articles/146540/ https://lwn.net/Articles/146540/ hp Of course you can figure this out painstakingly. What you can't do though is get all that info aggregated for 1) each process and 2) a current snapshot of all processes, in an easy way.<br> <p> Aggregating this stuff into a snapshot of the whole system at a point in time would let you really point fingers in terms of bloat and figure out where to concentrate efforts.<br> <p> It's not easy enough now, which is why people just use "top" and its misleading numbers.<br> <p> Even better of course would be to take multiple snapshots over time allowing observation of what happens during specific operations such as log in, load a web page, click on the panel menu, etc.<br> <p> A tool like this would probably be pretty handy for keeping an eye on production servers, as well.<br> Sun, 07 Aug 2005 21:59:26 +0000 Our bloat problem https://lwn.net/Articles/146538/ https://lwn.net/Articles/146538/ oak <p><i> I don't know how to get very useful numbers out of top myself - what one would want for a bloat metric is "malloc'd RAM unique to this process" or something,</i> <p>Malloc => heap. If the program has written to the allocated heap page, it's private. I don't see why program would allocate memory without writing to it, so in practice all of heap can be considered private to the process. <p>You can already see heap usage from /proc and with Valgrind you can actually get a graph where it goes. <p><i> perhaps "plus the size of each in-use shared page divided by number of apps currently sharing it," </i> <p>During his Guadec 2005 speech, Robert Love mentioned a kernel patch which will produce the information about how much memory is private (dirty = allocated heap that has been written to, shared library relocation tables etc.) to a process. He promised to add a link to it on to the Gnome memory reduction page. <p><i> perhaps "plus resources allocated on the X server side on behalf of this app." </i> <p>XresTop tells this. Some programs can push amazing amounts of memory to the Xserver (the huge number number shown in 'top' for Xserver comes from memory mapping the framebuffer though I think). Sun, 07 Aug 2005 20:56:34 +0000 shared libraries [ab]use https://lwn.net/Articles/146537/ https://lwn.net/Articles/146537/ oak I think the argument was that each *redundant* (unused) shared library <br> linked to the binary has a cost. <br> <br> For example: Just by linking a library (that your program doesn't use), <br> you've increased your program's memory usage by at least 4KB. At least one <br> private (non-read-only) page is reserved for symbol resolving of each <br> linked shared library. <br> <br> The new linker has a command line option to not to link dynamically <br> libraries that are not used. I think it was discussed on the Gnome <br> mailing lists, but globally enabling it had broken some program, so it's <br> not enabled by default. <br> <br> Sun, 07 Aug 2005 20:45:04 +0000 Calendar ui size https://lwn.net/Articles/146527/ https://lwn.net/Articles/146527/ eru <i>It is also a calendar and it has an interface into the evolution-data-server that allows it to display your evolution todo list and your appointments on the calendar. Now all of that in 10 megs. Is that too much? I don't know.</i> <p> Around 1987 I participated in writing a kind of office system for MS-DOS (commercial proram, but did not go far, very few people ever used it). Memory was tight, as the target was not expected to have more that 768Kb of memory and the network stack took a large chunk of that. Interface was based on textual "forms", not a GUI but close in ease of use. I did the overlay for a simple calendar. Entries were maintained with a simple B-tree database library, with files on a server so several users could consult each other's calendars. If I remember right, my overlay turned out to be the most "bloated" part, at about 20Kb of code (this excludes the DB and forms libraries, which were shared by all overlays of the app) ... and since this was 16-bit "compact" memory model code, everyone's in-RAM data had to fit in 64Kb. <p> So yes, I think 10Mb is too much for an interface to a calendar server. I agree the above 20kb+64kb would be too little for a modern program, but shouldn't around 10x, like 800Kb for code+data, suffice for even a quite sophisticated user interface? Consider that the entire Windows v2 GUI system could operate in a smaller RAM (640Kb) than that! Sun, 07 Aug 2005 10:35:43 +0000 Unshared memory usage https://lwn.net/Articles/146491/ https://lwn.net/Articles/146491/ komarek I ran the same commandline on gkrellm2, which includes a clock among many other monitors. I get 3436, more than wmaclock but still less than the clock applet. Crazy stuff.<br> Sun, 07 Aug 2005 05:45:57 +0000 shared libraries [ab]use https://lwn.net/Articles/146525/ https://lwn.net/Articles/146525/ hp It has a read-only display of your evolution calendar and todo list, if you haven't put anything into evolution then you won't see anything.<br> <p> Sun, 07 Aug 2005 01:02:03 +0000 Our bloat problem https://lwn.net/Articles/146523/ https://lwn.net/Articles/146523/ nix I'm sorry, but much of this post is just plain wrong. <blockquote> String operations become more expensive. Processing an UTF-8 string is usually n times more expensive than processing an ASCII string, because there is no match anymore between byte numbers an character numbers. </blockquote> Actually, only some operations (random access, basically) become more expensive. Random access inside strings is <i>rare</i>, and apps that do it a lot (like Emacs and vim) have had to face this problem for years. <p> We can't make the world speak English, no matter how much we might like to. Half the world's population speaks languages that require Unicode. <blockquote> o Conversion tables need to be in memory. Most applications load their own conversion tables, which means they are n times in memory. These tables are also loaded on startup, decreasing application startup times. </blockquote> I think you meant `increasing' there. :) but yes, this is a potential problem. It would be nice if there were some unicode daemon and corresponding library (that talked to the daemon) which could cache such things... but then again, the extra context switches to talk to it might just slow thigns right back down again. <blockquote> * Java, Mono, Python, Perl, TCL - These programming languages require runtime environments. The runtime environment needs to be loaded, can be slow itself and most importantly can use quite a bit of memory. It especially becomes bad if one multiple runtime environents get loaded on one desktop. Script languages can be good for scripts, but are bad for the desktop. The popularity of Java and Mono is propably a bad thing regarding the bloat on our machine. </blockquote> Actually, Python, Perl and Tcl have very small runtime environments (especially by comparison with the rampaging monster which is Sun's JRE). The problem with these languages is that their data representations, by explicit design decision, trade off size for speed. With the ever-widening gulf between L1 cache and RAM speeds, maybe some of these tradeoffs need to be revisited. <blockquote> * C++ - Even the de facto standard C++ is sometimes a problem. Especially if templates are being used C++ compilers output large amounts of code behind a programmers back. This can cause huge libraries and executables. </blockquote> Now that's just wrong. The use of templates in C++ only leads to huge code sizes if you don't know what you're doing: and you can write crap code in any language. <p> The size problem with C++ at present is the (un-prelinkable) relocations, two per virtual method table entry... this can end up *huge*, even more so in apps like OOo which can't be effectively prelinked because (for reasons beyond my comprehension) they dlopen() everything and so most of them goes unprelinked. <p> There was a paper recently on reducing OOo memory consumption which suggested radical changes to the C++ ABI. Sorry, but that isn't going to fly :) <blockquote> * Shared libraries - Many programmers are under the impression that use of shared libraries is free. WRONG. They need to be loaded, resolved and even if you only use part of them a large amount of code is executed within them before you know it. </blockquote> Wrong. Most shared libraries contain no, or very few, constructors, and so no code is executed within them until you call a function in them. (Now many libraries do a lot of initialization work when you call that function, but that'd also be true if the library were statically linked...) <p> The dynamic loader has to do more work the more libraries are loaded, but ld-linux.so has been optimized really rather hard. :) <p> Oh, and it doesn't have to load and resolve things immediately: read Ulrich Drepper's paper on DSO loading. PLT relocations (i.e. the vast majority, that correspond to callable functions, rather than those which correspond to data) are normally processed lazily, incurring a CPU time and memory hit only when the function is (first) called. <blockquote> o Libc is just a C runtime library but has unfortunately grown to several megabytes. </blockquote> That's because it also implements all of POSIX that isn't implemented by the kernel, and passes the rest <i>through</i> to the kernel. Oh, and it also supports every app built against it since glibc2 was released, which means that old interfaces must be retained (even the bugs in them must be retained!) <p> This nceessarily costs memory, but most of it won't be paged in (and thus won't cost anything) unless you run apps that need it. <p> You do rather seem to have forgotten that binaries and shared libraries are demand-paged! Sat, 06 Aug 2005 22:46:00 +0000 Our bloat problem https://lwn.net/Articles/146524/ https://lwn.net/Articles/146524/ CSEESystems I think people are missing something when saying the clock-applet is bloated. The clock-applet is not just a clock. It is also a calendar and it has an interface into the evolution-data-server that allows it to display your evolution todo list and your appointments on the calendar. Now all of that in 10 megs. Is that too much? I don't know. For me its alright, but all of my machines have plenty of ram and I don't generally feel the memory crunch from anything but firefox with pages with lots of flash or images loaded. <br> <p> Maybe someone needs to come up with a clock-applet-lite that only does the clock and not the rest of that stuff. Oh, and on my x86 system, the clock-applet has an RSS of 8.6 MB with the calendar loaded and everything. <br> Sat, 06 Aug 2005 22:44:39 +0000 Our bloat problem https://lwn.net/Articles/146522/ https://lwn.net/Articles/146522/ nix KDE can already use the visibility attributes (available in GCC 4 without the need to patch).<br> <p> I'm not sure if OOo can use them, but if it can't, it should. :)<br> Sat, 06 Aug 2005 22:30:40 +0000 It's the CPU too... https://lwn.net/Articles/146514/ https://lwn.net/Articles/146514/ rlrevell Whenever Linux desktop bloat comes up everyone wants to talk about memory wastage. But I think excessive CPU suckage is just as bad of a problem.<br> <p> Recently I found a horrible performance bug in Evolution where it repeatedly goes over every message header with an empty search pattern if the message search bar is empty (rather than short circuiting the entire search process).<br> <p> I distributed my quick hack solution to a few people on LKML and most people said it made browsing their mail 10x faster.<br> <p> Unfortunately it took weeks and much flamage for me to even convince the Evolution developers that there was a bug, because their machines are all so fast that the performance problem was imperceptible.<br> <p> Compare this to the Windows XP desktop which sucks just as much memory, but is SNAPPY on a sub-GHz machine.<br> <p> Another example, on my slow (600MHz) machine, I didn't even realize OO *had* right click menus, because after right clicking in the document they take about 3 seconds to appear. It feels like OO is generating the context menu from some XML template or something and then popping it up AFTER the right click is received. Completely unusable. Compare Windows, which has obviously generated, rendered and cached these menus and just has to blit them in from offscreen when the user right clicks (instantaneous). <br> <p> Memory isn't the problem, people. We're wasting WAY too many CPU cycles on bullshit.<br> Sat, 06 Aug 2005 18:22:21 +0000 shared libraries [ab]use https://lwn.net/Articles/146512/ https://lwn.net/Articles/146512/ rlrevell Heh, really? It doesn't do any of that fancy stuff for me.<br> <p> Right clicking only lets me "Copy Date", "Copy Time", "Adjust Date &amp; Time" or set the "Preferences".<br> <p> Left clicking brings up a view of the current month, that only lets me scroll back and forth to select a different day and month. AFAICT there's nothing you can DO with it.<br> <p> Are you sure you did not mean "in the FUTURE this will provide access to evolution calendaring functionality?"<br> Sat, 06 Aug 2005 17:59:16 +0000 Our measurement problem https://lwn.net/Articles/146509/ https://lwn.net/Articles/146509/ sandmann The kernel actually has a system call - mincore - that tells you which pages of a mapped file are in memory. I wrote a small program a long time ago that uses it to print more details about memory usage:<br> <p> <a href="http://www.daimi.au.dk/~sandmann/freon.c">http://www.daimi.au.dk/~sandmann/freon.c</a><br> <p> You have to be root to run it.<br> <p> Unfortunately a similar thing can't be done for malloc()d memory because mincore doesn't work for anonymous pages.<br> Sat, 06 Aug 2005 14:00:50 +0000 Our bloat problem https://lwn.net/Articles/146506/ https://lwn.net/Articles/146506/ dmantione In other words, it is bloat. All that people want fom libpng is read and <br> write png files and I doubt it is being used for more than that in the <br> majority of situations. <br> <br> I know the differences between iff and png. I'd say png is even easier to <br> read than iff. <br> Sat, 06 Aug 2005 11:22:08 +0000 shared libraries [ab]use https://lwn.net/Articles/146464/ https://lwn.net/Articles/146464/ hp Avoiding anything "not free" isn't a useful guideline.<br> <p> The question is what are the tradeoffs. In the shared lib case, for example, avoiding them often means efficiency loss:<br> - more code running total considering all apps<br> - each self-implemented version of the code is slower and buggier<br> than a highly polished common version<br> <br> Not to mention downsides such as security updates (you want to download libpng, or every single app using libpng?), bugs, lack of features, longer development time.<br> <p> So if shared libs aren't a significant percentage of the overall problem, then "not free" is irrelevant; if they are a significant percentage of the overall problem then "not free" is probably more an argument for fixing shared libs (or coming up with some less-broken module system than ELF shared libs) rather than an argument for static linking and hand-rolled broken code.<br> <p> Simplistic answers like "just don't use libs" are not useful. You don't want to warp the UI and implementation of every app in extensive ways just to work around a module system that needs optimizing.<br> <p> <p> Fri, 05 Aug 2005 20:25:28 +0000 Our bloat problem https://lwn.net/Articles/146460/ https://lwn.net/Articles/146460/ roelofs <FONT COLOR="#880044"><I>Also don't forget the small ones, libpng is over 200kb on my system, just to interpret some metadata grouped into fourcc chunks. This exclusive decompression,</I></FONT> <P> That's a rather simplistic view. libpng supports 19 pixel formats, depth-scaling, a moderately complex 2D interlacing scheme, alpha compositing, CRC verification, and various other transformations and ancillary bits. It also includes row-filtering, which is a fundamental component of the compression codec. I won't defend everything that's gone into libpng, but it's highly misleading to refer to all of it as bloat. If libpng (or a higher-level library built on top of it) didn't include it, all of your PNG-supporting applications would have to. <P> <FONT COLOR="#880044"><I>that is in libz (better, 80kb, but I remeber Pkzip being 30kb on my MS-Dos system).</I></FONT> <P> Your memory is slightly faulty there. PKZIP 2.04g was 42166 bytes, and if all you care about is compressing your files, I can do far better with my 3712-byte <TT>trunc</TT> utility--and at 100% compression, too! But if you'd actually like to decompress them again someday, you'd better add PKUNZIP 2.04g, which rang in at 29378 bytes. IOW, the PKWARE codec was 71544 bytes (plus a number of other standalone utilities), while my copy of libz.so.1.2.3 is 71004 bytes--and 1.2.2 was 66908 bytes. Keep in mind also that significant parts of PKZIP and PKUNZIP were written in assembler, which, though capable of producing much smaller binaries, is generally not considered by most of us to be the most productive or maintainable of programming languages. (And, btw, libpng includes additional MMX assembler code for decoding row filters and for expanding interlace passes.) <P> <FONT COLOR="#880044"><I>I'm sure the Commodore Amiga was able to read iff files (on which png is based) in less code.</I></FONT> <P> PNG was not based on IFF. The gross structure may have been suggested by someone familiar with IFF, but IFF itself was considered and rejected as a basis for PNG. <P> Greg Fri, 05 Aug 2005 19:56:17 +0000 shared libraries [ab]use https://lwn.net/Articles/146446/ https://lwn.net/Articles/146446/ dann Well, using lots of shared libraries affects the startup time. <br> Here's an example:<br> <p> echo 'int main (void) {return 0;}' &gt; t.c <br> gcc t.c<br> LD_DEBUG=statistics ./a.out 14237:<br> 14237: runtime linker statistics:<br> 14237: total startup time in dynamic loader: 550907 clock cycles<br> 14237: time needed for relocation: 250684 clock cycles (45.5%)<br> 14237: number of relocations: 99<br> 14237: number of relocations from cache: 5<br> 14237: number of relative relocations: 0<br> 14237: time needed to load objects: 158487 clock cycles (28.7%)<br> 14237:<br> 14237: runtime linker statistics:<br> 14237: final number of relocations: 100<br> 14237: final number of relocations from cache: 5<br> <p> gcc t.c -lgnomevfs-2<br> env LD_DEBUG=statistics ./a.out<br> 14253:<br> 14253: runtime linker statistics:<br> 14253: total startup time in dynamic loader: 14162855 clock cycles<br> 14253: time needed for relocation: 10427627 clock cycles (73.6%)<br> 14253: number of relocations: 1757<br> 14253: number of relocations from cache: 2501<br> 14253: number of relative relocations: 0<br> 14253: time needed to load objects: 3357732 clock cycles (23.7%)<br> 14253:<br> 14253: runtime linker statistics:<br> 14253: final number of relocations: 1793<br> 14253: final number of relocations from cache: 2501<br> (this is on a 2.8GHz P4)<br> <p> Obviously the above is only a small part of the startup time.<br> Creating and maintaing the page tables, running _init for each .so, <br> etc etc are other parts.<br> <p> Maybe a kernel person can tell us what are the kernel overheads from having lots of shared libraries... <br> Fri, 05 Aug 2005 16:38:11 +0000 shared libraries [ab]use https://lwn.net/Articles/146400/ https://lwn.net/Articles/146400/ dmantione No, that's the wrong assumption. Shared libraries are less expensive than <br> statically linked ones, but not free. <br> Fri, 05 Aug 2005 13:11:53 +0000 Our bloat problem https://lwn.net/Articles/146380/ https://lwn.net/Articles/146380/ dmantione 2M for a script. Try to measure again for a real app, say Mandrake's <br> urpmi and you'll see the Perl overhead starts to cost. <br> <br> I'm coding a lot in TCL by the way, but Pascal is my main language, as <br> I'm developer for Free Pascal. Incidentally Free Pascal is a very good <br> tool for fighting bloat. <br> Fri, 05 Aug 2005 09:37:16 +0000 shared libraries [ab]use https://lwn.net/Articles/146359/ https://lwn.net/Articles/146359/ hp Those specific ones must be gnome-vfs then, for https and authentication.<br> <p> It's simple enough to cut down library deps for certain apps, but I doubt it makes much real performance difference. (unused code isn't mapped anyway)<br> <p> Maybe it does, but that's why real data is needed.<br> <p> Fri, 05 Aug 2005 01:51:08 +0000 shared libraries [ab]use https://lwn.net/Articles/146347/ https://lwn.net/Articles/146347/ dann OK, ignore the clock then, let's look at any other applet, just as an example:<br> ldd /usr/libexec/null_applet | wc -l <br> 63<br> and it does link to the krb, ssl, gss*, gnome-keyring libraries (this seems <br> to be true for all the applets that I have tried, and in general all the Gnome applications seem to link to a huge number of libraries).<br> <p> <p> Thu, 04 Aug 2005 22:16:31 +0000 Emacs? https://lwn.net/Articles/146334/ https://lwn.net/Articles/146334/ iabervon I'm surprised that your emacs is so large. My experience with it is that it could actually be an acronym for "eight megs and constantly swapping", because it's always been about eight megs big (which I can barely remember being enough to constantly swap).<br> <p> If you're getting that size by using a bunch of emacs processes, you should probably look into emacsclient, which acts like an editor but edits the file in an existing emacs process. This also makes it practically instantaneous to start.<br> Thu, 04 Aug 2005 21:00:16 +0000 It's about time... https://lwn.net/Articles/146329/ https://lwn.net/Articles/146329/ jrigg <font class="QuotedText">&gt;It's significant that most people don't </font><br> <font class="QuotedText">&gt;_use_ the "lightweight" apps, though, </font><br> <font class="QuotedText">&gt;unless they really genuinely don't</font><br> <font class="QuotedText">&gt;have the compute power.</font><br> <p> I tried KDE recently after using WindowMaker and rxvt for the last few years. It was irritatingly slow even on a dual Opteron, so I reverted to my old setup. Maybe I'm impatient, but I prefer the speed of lightweight apps running on fast hardware. <br> Thu, 04 Aug 2005 20:47:36 +0000 Unshared memory usage https://lwn.net/Articles/146317/ https://lwn.net/Articles/146317/ pphaneuf I use wmcalclock, and the same command-line you get tells me 288. ps' vsz is 2868.<br> <p> Maybe I'm just too old school or something.<br> Thu, 04 Aug 2005 19:49:58 +0000 shared libraries [ab]use https://lwn.net/Articles/146315/ https://lwn.net/Articles/146315/ hp The talk about the clock is sort of bogus; the clock isn't just a clock, it's a small evolution frontend with all the calendar stuff in there. Those deps are coming from libedataserver (the evo backend)<br> <p> The size of the calendar on the screen is small but it still has to have the same data available as a full calendar app and be able to talk to calendar servers and all that crap.<br> <p> Thu, 04 Aug 2005 19:33:55 +0000 Our bloat problem https://lwn.net/Articles/146314/ https://lwn.net/Articles/146314/ henning The problem with qt (one big lib for small tasks) is identified, and resolved in <a href="http://doc.trolltech.com/4.0/qt4-intro.html#build-system">qt-4</a> . Now you must only load the needed parts for the gui, or the network specific lib for example. Thu, 04 Aug 2005 19:32:42 +0000 Our bloat problem https://lwn.net/Articles/146312/ https://lwn.net/Articles/146312/ berntsen If people malloc like you multiply, I see where the bloat is comming from, you have a factor of 10 wrong ;-)<br> <p> /\/<br> Thu, 04 Aug 2005 19:29:12 +0000