Ubuntu - a Speedup guide
Posted Oct 5, 2007 14:57 UTC (Fri) by slack (guest, #12206) [Link]
Perhaps I'm confused:
"data=ordered mode effectively solves the corruption problem found in data=writeback...we're going to change it to data=writeback"
The following IBM article has some details on ext3 journalling, the mentioned corruption, and some stats comparing ext3 journalling to ext2 and ReiserFS.
Ubuntu - a Speedup guide
Posted Oct 6, 2007 7:47 UTC (Sat) by muwlgr (guest, #35359) [Link]
I usually enlarge ext3fs commit interval and make it 3600 seconds instead of 5. With reliable power supply, this allows more aggregation and optimization for write traffic. And when the load on your FS is light, you don't have these write-jerks every 5 secs.
Ubuntu - a Speedup guide
Posted Oct 5, 2007 15:03 UTC (Fri) by rfunk (subscriber, #4054) [Link]
Ugh. The quoted recommendation explains how to trade reliability for
Ubuntu - a Speedup guide
Posted Oct 5, 2007 15:44 UTC (Fri) by sjj (subscriber, #2020) [Link]
Yeah, there should be rule that speedup tips at least try to measure what, if any, improvement happens with them.
from Dave Busby, my Linux guy, blockquote
Posted Oct 5, 2007 19:32 UTC (Fri) by ccyoung (guest, #16340) [Link]
Those arguments about reducing cache size I think are BS. Linux uses
Much of the Linux TCP stack is auto-configured at boot time based on
the amount of memory in the system. If you have more than 256M then
TCP is pretty aggressive, 128K max send buffer for example. This
example increases those values to 512K max - that's a lot of 1.5K
packets. If you have that much tcp traffic backed up then either a)
your machine is too slow to be a server or b) under attack SYN flood
or DoS attack. If I'm under attack I wouldn't want my TCP stack (or
any stack really) to start over-consuming memory. My opinion is that
TCP and other network stuff doesn't need to be tuned unless a) packet
analysis and tcp statistics show clear need or b) the system will be
used in a very specific environment (i.e. not the internet)
from Dave Busby, my Linux guy, blockquote
Posted Oct 7, 2007 15:32 UTC (Sun) by BenHutchings (subscriber, #37955) [Link]
In current versions of Linux the TCP buffers are automatically adjusted for each connection.
Ubuntu - a Speedup guide
Posted Oct 5, 2007 19:53 UTC (Fri) by peace (guest, #10016) [Link]
The:
sudo gedit /etc/init.d/rc
Look for CONCURRENCY=none and change it to:
CONCURRENCY=shell
was very helpful. My wireless would hang the boot process for up to a minute. Now it just breezes by.
CONCURRENCY=shell
Posted Oct 9, 2007 9:52 UTC (Tue) by edschofield (guest, #39993) [Link]
It also causes problems on some setups: see bugs #149881, #137559, and some of the other duplicates of #25931.
usual crap guide "from ubuntu" :(
Posted Oct 5, 2007 20:05 UTC (Fri) by gvy (guest, #11981) [Link]
Reposting a comment just in case -- hope that those who well might feel offended by a couple words will still get me right:
---
> Ubuntu has been main player in Linux distro for a couple of years,
> and yet some might found it to be a little bit slow in a few aspects.
Sorry but the rest of the article is BS in similar proportions to this heading sentence.
Ubuntu is a main hype generator in Linux distro scene for a couple of years, not the main player.
Some might have found it to be extremely sluggish both during installation and usage (what, an hour to install a single CD on AMD64?).
If one wants speedy FS, they should consider reiserfs (which would very rarely but quite disasterously just blow up) or xfs (which requires an UPS to run w/o data loss). Both are way faster than ext3 under many conditions, XFS being especially good under simultaneous multi-threaded r/w load due to delayed allocation and extent-based design. Playing with elvtune (or sysfs equivalent for 2.6.x) might be worth trying too.
If one wants a bit more RAM, then not killing the cache but BUYING MORE RAM is the answer. If thats not possible/feasible, then fiddling with vm.bdflush after reading up on sysctl(8) and linux/Documentation/vm/bdflush.txt IIRC should help.
And puhlease dont just go out on a limb to break your network setup for no reason.
> They are not Ubuntu specific.
Well, but this posting largely fits what I see coming from Ubuntu crowd: incompetent (semi-competent at best) but *very* bold articles, every single of them starting with Ubuntu praise.
Yes, my tone is rude on a purpose: would you please be so brave to discuss or explain the shaman voodoo you recommend? Experience in Linux training taught me that theres little out there to prove (or put down) ones knowledge than explaining things to 3rd party, and answering why?s too.
I wont even question your thesis on Ubuntus mainness, given that. Answering would be too hard in too many aspects. :-)
Good luck, anyways! None of us is perfect, we just shouldnt put out bold lies.
usual crap guide "from ubuntu" :(
Posted Oct 5, 2007 23:29 UTC (Fri) by pheldens (guest, #19366) [Link]
All journalling file systems need an ups (or disk write caching disabled.)
usual crap guide "from ubuntu" :(
Posted Oct 6, 2007 7:42 UTC (Sat) by alankila (guest, #47141) [Link]
And killing the write cache is practically disk suicide, the mechanics wear out much faster.
The only data-safe, disk-saving, and fast way seems to be battery-backed RAM on hardware raid controller.
Or does anyone know anything better?
usual crap guide "from ubuntu" :(
Posted Oct 6, 2007 7:55 UTC (Sat) by Los__D (guest, #15263) [Link]
Even though it is not the main purpose of the new harddrives with a bit of flash added, wouldn't these help?
usual crap guide "from ubuntu" :(
Posted Oct 6, 2007 8:32 UTC (Sat) by alankila (guest, #47141) [Link]
Well, I can foresee some issues:
* flash is slow to write to (so you have to write to several chips in parallel to not make a bottleneck of this)
* flash wears out with writes (but the real question is, does it wear out faster than the mechanical parts)
It might be more reliable and cheaper to just to plug in battery that makes the existing drive cache RAM persistent.
usual crap guide "from ubuntu" :(
Posted Oct 6, 2007 9:05 UTC (Sat) by drag (guest, #31333) [Link]
> * flash is slow to write to (so you have to write to several chips in parallel to not make a bottleneck of this)
Ya, but seek times are very very fast (compared to harddrives). If your dealing with large amounts of small files or cache'd bits and peices of large files or something like that then flash will help out a lot.
In a modern system most time waiting on the harddrive, I figure, is waiting on seek times. For example during boot up I would expect that flash would have considurable performance advantages.
This is the classic performance killer for application start-up for Linux. Often apps will poll all sorts of different files all over your directory system.. all of these are different sizes and made at different times so you can end up with considurable performance badness as your harddrive is spinning around seeking.
> * flash wears out with writes (but the real question is, does it wear out faster than the mechanical parts)
The answer is 'It Depends'.
In Unix there are traditionally been things like 'Block devices' and 'Character Devices'. Characters are things like keyboard and mice, Block devices are storage, right? (well something like that).
Well true flash-based drives are neither. They are a third thing called MTD for memory technology devices.....
HOWEVER for consumer technology for things like Compact Flash, USB Mass storage Flash, SD Flash cards and so on and so forth use hardware to emulation to be block devices. So even though flash is technically MTD the OS can only see them as block devices, generally.
So what does that matter?
Well it's all about the 'load balancing'. That's how flash devices can outlive their mechanical counterparts. If you have efficient load balancing AND don't use the full capacity of the flash drive you can have a flash drive that will easily outlive a harddrive even under 24/7 loads. Modern high-quality flash drives could probably last 5-10 years even under heavy loads if everything is cool.
But if you have inefficient load balancing AND/OR are continously using the device at the full capacity then that will cause parts of the flash drive to wear out much quicker and then you'll have problems.
So idealy Linux should access these things as MTD and use intellegent load-balancing file systems and work with the hardware to ensure the highest performance and long-life possible. Linux has a couple FS's that can do this sorta well, but you run into two major problems. A) because of the Windows consumer market nobody makes commodity MTD except for embedded markets, B) currently flash file systems for MTD are limited in scalability. These FSs are things like JFFS/JFFS2 and such.
People do use Flash file systems on consumer 'flash' devices though.. but that's through MTD emulation on top of a block device. So you have MTD software emulation on Block hardware emulation on MTD devices, which is hardly ideal.
So for the most part your utterly dependant on the hardware built-in to your device for any loadbalancing features. This is critical that it's high quality.
Plus I beleive the second part if your using 50% the capacity of a device it'll last a lot longer then if your using 90%, given the same load. A lot more to balance.
And then it also depends on the application... if your using a harddrive in a mobile device you can understand that flash-based drives have considerable advantages... ie if you drop them they won't break.
Plus they use a lot less electricity to maintain and run and if you shut them off then they are non-volitile memory.
So they are ideal for situations were you can heavily leverage file system cache, swap file, pre-loading applications, and in rugged environments. Traditional harddrive are good for large amounts of storage and streaming media. The less you use the harddrive the more reliable your mobile device will be, the faster it'll be, and the less battery it'll use, but less suitable for large amounts of storage and media applications.
So by combining the two your hopefully going to see significant advantages then compared to using just one or the other.
Now it would be nice to have 16 gigs of RAM cache with battery backup. That would be like Flash++, but batteries wear out over time and the memory is going to be fairly expensive. 16gigs of Flash is pretty cheap in comparision, in terms of the actual device and the sort of hardware you need to support it.
usual crap guide "from ubuntu" :(
Posted Oct 6, 2007 9:23 UTC (Sat) by Los__D (guest, #15263) [Link]
Hmmmm... I think you misunderstand a few things.
Character devices are just anything where is most efficient (and usually only possible) to read or write the data character for character from one end of the data, like a long queue.
Block devices just means that you usually read in blocks, like "a 512 byte block in address (position) 0x43453243". What is underneath (flash, harddrive, CD-ROM, punch-card) and the ways of translating it to an address (if needed, like for a harddrive from cylinder, head, sector) doesn't really matter. I don't think that just because it's a MTD, that would change (Almost no matter what, it'll be most efficient to fetch a certain size block from a certain address).
It's not called "load balancing" (although the word certainly makes sense), but "wear levelling". On some embedded systems, it is the job of the OS to do that, but for most drives, it's done by the hardware/firmware. I'm pretty sure that the flash enhanced harddrives also take care of those details.
usual crap guide "from ubuntu" :(
Posted Oct 7, 2007 19:47 UTC (Sun) by drag (guest, #31333) [Link]
Ya; I ment 'wear leveling'
I am not a expert and your probably right about all your points. Just repeating what I've read elsewere.
usual crap guide "from ubuntu" :(
Posted Oct 6, 2007 10:55 UTC (Sat) by alankila (guest, #47141) [Link]
Now you come in and mix in some real world with this discussion. I think we were hypothetically discussing use of flash inside the drive, probably managed also by the drive, which would be used chiefly to improve the drive reliability.
The case for flash is that it can tell CPU faster than the mechanical platter array that "OK, the data is committed to permanent storage". (Or that it has been read, if the requested sectors happened to be on flash.) That means increase of performance when it can happen. It can also mean power savings if the disk is sleeping and the flash can handle the read or write.
I wish to stress again that I'm not discussing any practical implementation, whose details may differ...
Even if flash cache of some kind theoretically helps with small files scattered throughout the device, it is only one part of the performance picture. Hard disks have historically stellar sequential write performance, and a hypothetical flash-based drive like ours would therefore need at least that much of bandwidth for flash memory, assuming that all the writes go through flash. (If they do not, for instance, the drive detects that it can do the sequential write really fast because heads are already positioned correctly, then this problem is no longer very important.)
As to the wear issue, there is no magic bullet. If you go to the trouble of putting, say, 1 GB of flash on a harddrive you'd probably make as much use of it as possible. For a pure writing load, a simple round-robin block allocation would make most sense.
It's important to note that in this case, talking about any filesystem usage is pointless. Ultimately you have 1 GB of data to write to flash. If you write 1 GB, you make some number of write operations, which are in the ideal situation balanced across all the flash chips and their individual cells. (It's true that flash wears out faster if you can't do this, but I'd take it for granted that this matter would be properly handled.)
The only thing to reduce the wear is to increase the storage size. If you had 2 GB of flash, then each 1 GB worth of writes only needs to touch half of the chips, and you have thusly halved the wear seen by each chip in average. As far as I can see, this is the only method to increase the flash longevity.
usual crap guide "from ubuntu" :(
Posted Oct 7, 2007 19:45 UTC (Sun) by drag (guest, #31333) [Link]
> As far as I can see, this is the only method to increase the flash longevity.
Well that and the quality of the flash material themselves.
Back in the bad old days it was possible to easily screw up a flash drive. Nowadays it would take a couple years of constant writing to do it. They've expanded it's lifetime by tens or even hundreds fold.
usual crap guide "from ubuntu" :(
Posted Oct 8, 2007 19:48 UTC (Mon) by alankila (guest, #47141) [Link]
Hm, yes. The advance of science generally helps. But it's different. You couldn't just order the engineers to use flash that lasts twice as long, if such flash hasn't (yet) been invented.
Ubuntu is the best hope for Linux hardware support, and helps Debian too
Posted Oct 6, 2007 10:20 UTC (Sat) by Cato (subscriber, #7643) [Link]
Maybe it's best not to judge an entire distro and community by a few crap articles - I agree this one was mostly crap. Ubuntu is hugely impressive in its merging of Debian's technical competence and package coverage with an almost Windows like user friendliness.
I've used Linux for 10 years and Unix for much longer, and Ubuntu is the first distro I've seen that is trying to stay free software yet also managing to do seamless installation of multimedia codecs and video drivers, *with* suitable warnings so people realise that binary codecs/drivers are a bad thing in longer term.
I'm a co-developer of TWiki, a wiki engine that's popular for enterprises, and Ubuntu is like Debian in that you can just 'apt-get install twiki', as with 20,000 other packages, which makes it easier to install TWiki on Ubuntu than on Windows, Fedora, SuSE, etc (and a manual install is quite hairy).
Yet Ubuntu is also friendly enough to give to my mother, advanced enough to get Compiz working for eye candy, and still offer easy LVM and RAID setup via the Debian-derived installer. And I can install Xubuntu on my old laptop with good performance, and easily install ies4linux to get IE6 for those annoying Windows-only sites. And most of all it has the amazing APT for easy installs, upgrades and security fixes.
It's not that you can't do any of these things in other distros, it's that you can do this all within one distro, with closely-integrated variants covering XFCE, KDE and education (with LTSP). And there's a real prospect that Ubuntu can break through and get major vendors to start supporting Linux on desktops and laptops.
Ubuntu tries to be a good citizen, resyncing from Debian every 6 months and where possible pushing any relevant fixes upstream. I'm sure it doesn't always succeed, but IMO it's helping Debian while also helping every other Linux distro by pushing for FOSS hardware specs and drivers on desktops/laptops. Even if you still hate Ubuntu, you should like what it's doing for Debian, and what it *may* be able to do for hardware specs/drivers if it continutes to grow like this.
Ubuntu is the best hope for Linux hardware support, and helps Debian too
Posted Oct 6, 2007 14:30 UTC (Sat) by richo123 (guest, #24309) [Link]
I hate Ubuntu because:
a) It was started by a playboy cosmonaut with many millions of dollars
b) It is ripping off Debian
c) It is released every 6 months so isn't perfectly bug free
d) It gets tons of publicity whereas my leet distro (insert: debian, pclos, fedora, gentoo, slackware etc etc) is clearly superior.
e) It is all hype. All those overblown overpaid ex-Debian developers sit around the Shuttleworth mansion issuing press releases and slapping each other on the back on mailing lists and blogs.
f) It doesn't fit my image of linux.
/sarcasm
usual crap guide "from ubuntu" :(
Posted Oct 7, 2007 2:03 UTC (Sun) by shadesfox (subscriber, #28651) [Link]
You make it sound like these 'guides' were never made before Ubuntu.
usual crap guide "from ubuntu" :(
Posted Oct 8, 2007 0:51 UTC (Mon) by cjwatson (subscriber, #7322) [Link]
Your subject line says "from ubuntu"; I'd like to make it clear that this guide isn't from the Ubuntu project, nor do we endorse it.
Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds