Multiple everything - using VMWare, VirtualBox and Multisystem usb drives
By: richard dale1
Aug
Recently there was an post on Hacker News about collective nouns for birds in English. I run loads of virtual machines on my computer and I wonder what they should be called - 'a herd of virtual machines'? I have the mediocre Windows 7 Home Premium, and I wonder if that should be called a 'A badling of windows' after the phrase 'A badling of ducks'.
Can Web Developers Scale?
By: jaroslaw staniek11
Oct
McGrath's dream, linked by Henri:
"There's a huge pool of web developers with HTML and JS skills that can now contribute to desktop apps. Watch how fast GNOME and KDE advance when this happens."
Can Web Developers Scale?
It is obviously not a new story. Nicely commented by elanthis:
"That's like saying that there's a huge pool of high-school physics teacher who can now contribute to solving cold fusion. [..]"
Really I admire talented web devs. But I think while most of developers are web developers, most brilliant developers are not the web ones. And Oh, I remember Aaron having some fun when noticing people are excited that drag and drop works in their nice browser-is-my-desktop paradigm. I had too. And still have, say, after noting that just dragged random static graphical element in a browser by accident.
- jaroslaw staniek's blog
- Login or register to post comments
- Read more
Jobs
By: krake7
Aug
I am not talking about His Steveness or this kind of jobs (congratulations to both involved parties!), I am talking about these.
Traditionally we have been writing in a very start-to-end fashion, where execution starts at an entry point and ends when the task is done.
At first there wasn't any reason not to do this as there was no user interaction during a programs execution point or only at controlled points, e.g. a console program asking for a Y/N descision.
Then, with the switch to event based main execution, that changed to having multiple entry points but each usually still starting an execution chain that finished a complete task in one go.
One of the reasons for this "complete task in one go" style is that it is a lot easier to code. All necessary data only has to live during this uninterrupted execution, nothing else can interfere and maybe make some of the data invalid, etc.
This is of course no problem for anything that can be done fast, but long duration processing like the introduction of network I/O with its latency and overall time requirements made it necessary to come up with new styles.
One of them is staying with the start-to-end fashion but move the execution to a parallel processing unit. e.g. multi threading.
Another one is processing the task in smaller steps, using the a similar technique already used for separating the tasks, e.g. event based.
Given that Qt already has event driven processing, doing it for things like networking was a natural choice.
However, mainly because Qt's I/O classes are relatively low level and at that time weren't as unified as they are nowadays, KDE developers came up with an even nicer to use idea: jobs.
A job is basically a context for processing a single task (though such a task could of course be an aggregation of sub tasks). It is started and ends at some point, it might report progress inbetween, might even be able to be suspended and resumed.
Implementing a task as a job is usually more challenging than the traditional uninterrupted execution path, but it is really not much more difficult to use: you create the job object, connect to its result signal and start it.
Sure, compared to a normal method call you don't get the result at that part of your code where you start the thread, instead you need an addition method (the slot the result signal is connected to).
However, you also have advantages, like having all data necessary for the task stored in the job object and not having to keep it around elsewhere (but still having access to it from whereever you interact with the job).
Unfortunately they are not yet widely used outside of I/O bound tasks, quite some other long duration processing is implemented in keeping the event loop running but not actually returning from the current code context, e.g. "blocking" user input by showing some kind of process dialog, returning either when finished or when the user explicitly cancelled.
At first this looks just like another good option for doing long duration task processing, however this can lead to multiple execution contexts within applications that are not prepared for that (because they know they are not using threads so they don't expect things to be called twice).
This possibilty of unexpected re-entrancy is often overlooked because the magnitude of operations is caused by user input and thu,s by taking that out of the equation, makes the approach "safe" again.
I put "safe" in quotes because it isn't true. Events can not only caused by the application's user, it could be caused by a timer reaching its timeout, or a socket becoming available for reading.
One could work around some of these by means of flags or similar status variables but even for application code this becomes really messy at some point.
It is almost an invitation for disaster for any form of library code.
In KDE PIM we've got bitten by that a lot during the last couple of releases due to libraries and applications assuming things like instant access to data. We had to effectively split a lot of our code into smaller parts that could deal with having some data arrive in chunks or not at all.
That was a lot of work and mostly only possible because none of these libraries were public API, thus allowing us to change them without caring about even source compatibilty.
So my advice to anyone adding new libraries that involve long duration processing, don't assume that all applications using the library will be fine with the library blocking the user input as its sol method of avoiding re-entrancy.
Think about providing job based API and let application developers hook it up to a progress dialog if that's how they want it processed.
Heck, if it is really so difficult to connect the job's result signal to an appropriate dialog slot, provide a convenience function that does that and extracts and returns the result from the job.
- krake's blog
- Login or register to post comments
- Read more
And now what ?
By: heliocastro16
Jul
Brazil's copyright law forbids using DRM to block fair use
Chile becomes first country to guarantee net neutrality
Software Now Un-Patentable In New Zealand
What is your country is doing for you ?
Goodbye Okular
By: brad hards8
Jan
The Okular team has never been all that big. Recently we lost Pino as the maintainer. His reasons are his reasons, but I can't say I blame him. I can personally no longer tolerate the level of abuse that we're seeing on bug reports. The latest example is Wishlist item 157284
I'm unsubscribed from the okular-devel mailing list. I'm not going to be in #okular. I'll still look at XPS bugs if I notice them.
Anniversary
By: jaroslaw staniek5
Dec
Today we enjoy 11th anniversary of disclosure of Microsoft's best business and development practices:
- jaroslaw staniek's blog
- Login or register to post comments
- Read more
From the middle of nowhere
By: tstaerk29
Sep
The plus one post
By: amantia25
Aug
Recently, let's say in the past year, I saw a growing number of email messages on the KDE lists with the following content only:
+1
KDE and resource usage - how to get it wrong in several simple steps
By: lubos lunak10
Aug
Do you want to write something about KDE's memory usage? Simple, just follow these steps:
- Launch KDE.
- Run some random tool for measuring memory usage, preferably top.
- Pick a column you think you know what it means. If you can't decide, just pick one, preferably something with big numbers (big numbers look better, remember).
- Complain that the numbers are way too big. For higher bonus, compare it to something else, preferably something that gets nowhere near KDE's usage of shared resources (=libraries, mostly, but not only).
- ???
- Profit!
Really, it's as simple as that. So many people do it, you can too. See, for example, this review of KDE4.3. I have nothing against the review itself, since, I admit, I mostly skimmed over it, only two things caught my attention. First one was getting it backwards who copied from who the filtering feature in Present Windows compositing effect, which slightly amused me, and second one was the part talking about resources, which didn't.
The first item there is about kioslaves supposedly staying running for way too long, and it's not interesting here (although I like how it says "I suspect", like if checking it for real and then creating a bugreport is way too much work). The second item is about KWrited taking, imagine it, 18M of memory, and the last one is about the nVidia libraries wasting a good amount of memory, again.
Checking the KWrited item (I guess I was curious, or maybe bored) showed me several things. First of all, I don't have any KWrited daemon - openSUSE has libutempter, which allows building KWrited just as a KDED module. So instead I took KAccess, which should get similar treatment and not run on every system when it's mostly useless. Looking at numbers in top showed resident memory usage (RSS) 40M and shared memory usage (SHR) 25M. That was interesting for several reasons, like 40M being quite a lot, even for shared usage (since resident memory usage includes also all shared stuff, and so it doesn't really mean that much), or the fact that unshared memory usage for a small daemon being 40M-25M=15M is just plain rubbish.
The 40M is actually easy to explain - it is loaded using kdeinit, so it includes all memory from the basic libraries that are preloaded by kdeinit and shared by everything it launches. That includes the ~10M unshared bonus from nVidia libGL libraries that kdeinit helps to share.
The seeming 15M of unshared memory was more interesting and strange. Checking /proc/PID/status confirmed that data of the process is nowhere near that and that there must be something wrong going on. Checking /proc/PID/smaps in details showed similar results, again nothing anywhere near 15M. It is also not nVidia, since the memory is marked as dirty, but shared. And then it suddenly was obvious. The kernel (since that is whose numbers top blindly repeats) doesn't consider dirty shared memory to be really shared. A major portion of the 15M is the position-fixing of the non-PIC nVidia libraries, and some of it is also memory taken by symbol-binding to libraries. If a shared memory is dirty, then it may be dirty, but it is still shared. It got dirty before kdeinit started forking off new processes for launching, so it must be shared. Checking with Exmap, the only memory tool I trust so far, confirms. It is still some memory taken (and still big enough for those who don't know which year it is), but it's much smaller than what it seemed like.
Now, no wonder pretty much nobody can get KDE's resource usage right, when both people don't understand it and tools report nonsense. As it is said, two wrongs don't make a right. Here, they usually just make only a bigger wrong.
So, John, I think I might know what you could add to KSysGuard, after all. You could try to make KSysGuard a memory measuring tool that, unlike the rest, doesn't suck and make people write nonsense about KDE's resource usage. The magic line, in bash terms, is:
echo 0 $(cat /proc/PID/smaps | grep TYPE | awk '{print $2}' | sed 's#^#+#' ) | bc
Where PID is pid and TYPE is:
- Size - that, as http://ktown.kde.org/~seli/memory/analysis.html says, means next to nothing in practice, so if you use it, make sure to hide it well.
- Rss - resident memory usage, all memory the process uses. While somewhat interesting as the grand total, not really that good number on its own, as a good portion of it is shared with many other process. Put it somewhere in the back.
- Shared - (i.e. Shared_Dirty and Shared_Clean together), the total amount of memory shared, what would SHR in top be, if it wasn't broken. Not really that interesting, unless somebody wants to admire how good we are at reusing stuff.
- Private - (again, both Private_Dirty and Private_Clean), the memory of the process itself, its own memory that is not shared with anything. It is probably worth the second memory column, after Pss below.
- Swap - I guess it says something useful too, but with my machine's swap being pretty much useless, I can't quite say :) .
- References - with documentation for smaps not being what it should be (that is, existing), I can't quite say what it is, but I think it is for measuring statistics about how much memory a process accesses over a time. There seems to be a way to reset the number. For KSysGuard, probably useless. However, when trying to find out in kernel sources about it, I found a nice little gem, the next entry.
- Pss - this is the thing I love about Exmap. It is not as good as what Exmap can do, but it's good enough. It means, according to the sources, Proportional Set Size, and it is Rss adjusted for sharing. If a process has 1M private and 10M shared between 10 processes in total, Pss is 1+10/1=2M. In other words, this is the number that can take into account the fact that KDE applications massively share memory. This should be THE memory column in KSysguard.
I hope this can work out for KSysGuard. I am slightly worried that fetching all these numbers from kernel will take too much time, but that needs to be tried. But, if it will work, do we all now know what will be so special about KSysguard?
Changes in communication channels
By: krake16
Feb
When people used to say that blogs are the new usenet, they meant that discussions and flamewars which used to happen on usenet newsgroups, now happen in blogs and their comment sections.
Some bloggers even use their new publishing channel for making inquiries, i.e. the famous and infamous "dear lazyweb" postings.
See? I wrote unconsciously even used "postings", not something like "personal log entry"!
Anyway.
I've come to the conclusion that there is another shift of media going on, this time a move away from mailing lists. I have to say that I haven't yet been able to determine where the usage shifted to, so in case you have ideas, please let me know.
It is probably also quite dependent on target audience because at least our developer mailing lists seem still to be used for questions, announcements and so on.
Since, as a free software community contributor, I am primarily a developer nowadays, I wasn't aware of this change in other areas of contributions.
For example about a month ago I sent an invitation to the two main Free Software Desktop projects, cunningly addressing their "external relationship" mailing lists (or what I percieved to be their most likely mailing list for promotional activities): GNOME's marketing-list and KDE's promo list (same posting on both links, called cross posting in the good old times).
Unfortunately, I have missed the memo about switching to a different communication channel, see above.
Or neither project has any interest in getting in touch with their Austrian users or just trying to attract Austrian contributors.
I know, I know! Even thinking about this possibility is absurd, it must be the change of communication channels.
So, dear lazy web (see? can do this as well, I am quick study), if you have any hint on what this new channels are, the Austrian Free Software enthusiasts would be very greatful to know, in particular the organizers of Grazer Linuxtage.

