4 ms·
Choosing Linux for stable APIs would be rather silly. X11 is evolving rapidly nowadays and audio APIs are in a state of constant flux, where the different APIs
by modeless 17y ago
Choosing Linux for stable APIs would be rather silly. X11 is evolving rapidly nowadays and audio APIs are in a state of constant flux, where the different APIs often interfere with each other and there's no obvious best solution. Linux changes ABIs all the time and is notorious for C library incompatibilities. This recent mess with filesystem write semantics (http://lwn.net/Articles/322823/ http://lwn.net/Articles/322823/ ) has proven you can't even rely on POSIX.
Meanwhile, Win32 has been far more stable over the years and Microsoft has put a ton of effort into backwards compatibility. Don't get me wrong; I like Linux but API stability is not the reason to choose it over Windows.
- Periodic 17y agoThere are benefits and drawbacks to maintaining an API vs updating it. Switching every few months will alienate your developers, but making sure everything is 20 years backwards compatible will lead to strange errors (particularly because programmers will expect their idiosyncratic workarounds to continue to work) I think the more important question is how the groups responsible will handle the transition. A well planned and executed transition will give many developers a chance to switch gradually and by the time the old API isn't supported the older versions of the program will likely only be run on the older versions of the API anyway.
- rbanffy 17y ago"This recent mess with filesystem write semantics (http://lwn.net/Articles/322823/ http://lwn.net/Articles/322823/ ) has proven you can't even rely on POSIX." I have to disagree. The "problem" resides in the way ext4 writes data to the disk. If you need crash-resistance (the data-loss occurs on computer crashes) ext4 is not for you. And keep in mind if you really need it, ext3 isn't for you either. JFS or XFS, perhaps, and ZFS, but I never intentionally crashed a machine with unwritten data since, perhaps, my Apple II days. This has nothing to do with POSIX.
- jacquesm 17y agoI have several hundred million files stored on XFS, not sure if that's a lot or a little by HN standards, but maybe it counts for something. We will never ever have another XFS setup with a filesystem where deletions are to be expected. XFS works fine as long as you are just adding files to the filesystem, deletions are pathologically slow. We've tried just about every trick in the book and have finally made the decision to switch back to ext3, which given the number of files will take a while. So, that's nothing against XFS from a reliability point of view, but definitely from a performance point of view.
- rbanffy 17y agoInteresting. I had a meeting where XFS got high praises from a very knowledgeable person. The catch is that in this solution, files are added and appended and very seldom deleted.
- jacquesm 17y agoOur usage is pretty specific, it took us a while to narrow this down to XFS mainly because it was hard to believe how slow it was. Deletion can be much slower than file creation if the files are small. If you google for 'xfs delete speed' you'll get plenty of bits of information, the best fix was the 'nobarrier' option. Deleting files at random is especially bad.
- blasdel 17y agoDeletion can be much slower than file creation when the files are hundreds of mb too! Worst of all, "rm -R" runs right into XFS's most pathological case -- it's doing tons of metadata reads while it unlinks files, and XFS shoves a lock in every orifice.
- vlisivka 17y agoExt4 - is badly configured Ext3 (data=writeback mode) with extents support. By default, in recent kernels, Ext3 is configured in same way as Ext4 (data=writeback). In RedHat/Fedora/CentOS/etc., Ext4 is configured properly (data=ordered): "Don't worry about the new default journaling mode for ext3 planned for 2.6.30 (data=writeback, which is much faster than the old default, data=ordered, but has enormous security and data integrity problems). No distro would ship this as the default. The only way it could happen at Red Hat is over the dead bodies of the security team, who, let me tell you, keep an eagle eye on file system data leaks like this." Ext4 is not alone - other file systems (Ext3, XFS, maybe others) are patched to support new file rewrite semantic too. PS. I saw lot of zero-padded files on XFS until switched to Ext3 with data=ordered.
- jmillikin 17y agoThe X11 protocol was standardized in 1987. Any X application which worked then would work now. There are extensions and new capabilities being added, but every one is backwards-compatible. Ditto with audio APIs -- the last major change was the changeover from OSS to ALSA, in 2002, and to this day there's an OSS compatibility layer. I've used Linux since early 2001, and in all that time I've never encountered an incompatibility with libc. The filesystem semantics issue is due to idiot application developers trying to squeeze out a few msec of performance, at the risk of their user's data. The issue exists on every modern filesystem, no matter which OS is used. Anybody who relies on POSIX -- ie, uses fsync() -- doesn't have to worry about that problem.
- blasdel 17y agoThe reason application developers haven't been using fsync() is because it's ridiculously slow on ext.
- modeless 17y agoYes, X11 is backwards compatible and that's been really great for the Linux desktop. But the article bashes Windows for rapidly introducing new APIs even though the old ones remain compatible; I'm just pointing out that Linux does that too. As for the audio situation, the problem is sharing between multiple apps. ALSA sucks at it so "sound servers" were invented but they caused more problems than they solved. Now it seems like every distro has a different sound solution, and meanwhile OSS was never removed from the kernel so you can't even rely on ALSA always being there. The filesystem problem can't be blamed wholly on apps or kernel devs; IMHO the problem really lies in POSIX which doesn't specify a way to achieve what app developers need in a way that can also be easily implemented in the kernel with good performance. I would argue that the behaviors app developers were using became a de facto part of POSIX and the way kernel devs broke them was irresponsible even if it didn't break the letter of the standard. Contrast with Microsoft which goes far, far out of its way to avoid breaking apps even when they flagrantly violate good practices (there are some great examples on The Old New Thing: http://blogs.msdn.com/oldnewthing/ http://blogs.msdn.com/oldnewthing/ ).
- 17y ago