Slashdot Mirror


Revisiting FreeBSD vs. Linux for MySQL

Dan writes "Jeremy Zawodny, who looks after all of Yahoo!'s MySQL servers says MySQL now runs very well on FreeBSD. He is no longer steering people toward Linux. There are two important things you should do to make the FreeBSD/MySQL combo work well: (1) build MySQL with LinuxThreads rather than FreeBSD's native threads, and (2) use MySQL 4.x or newer."

32 comments

  1. FreeBSD by Anonymous Coward · · Score: -1, Flamebait

    is dead. Get over it.

  2. MySQL is dead. by Anonymous Coward · · Score: -1, Flamebait

    $subj says it all.

  3. Slashdot is dead by Anonymous Coward · · Score: -1, Flamebait

    deal

  4. or (3) pkg-add -r postgresql7 by DrSkwid · · Score: 2

    cos i thinks that's newer than mysql will ever be 8)

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:or (3) pkg-add -r postgresql7 by Pathwalker · · Score: 4, Informative

      Personally, I like using "cd /usr/ports/databases/postgresql7 && make install" rather than using a binary package, as that way you have the source code on your system, and you can use all of the wonderful things in the contrib directory.

      tsearch is a very nice GIST indexed full text search that does word stemming.
      reindexdb is a handy way to regenerate all of the indices in a database without interrupting anything.
      earthdistance is far faster than writing the same thing as a SQL function.
      ltree is wonderful when you have to deal with a hierarchy.

      And those are just the ones I remember offhand...

    2. Re:or (3) pkg-add -r postgresql7 by TheRaven64 · · Score: 5, Informative

      Up to a point this is true. However MySQL does win on one point, namely that if you do not need most of the features of a real RDBMS then it is faster than Postgres. If you are just using it as an information store for a web site, for example, then it may be a better choice. As always, right tool for the right job.

      --
      I am TheRaven on Soylent News
    3. Re:or (3) pkg-add -r postgresql7 by lowmagnet · · Score: 4, Informative

      And PostgreSQL is easier to work with. And setting up PgSQL is a breeze. And..

      I could go on all day about why I don't use MySQL. Just because a great percentage of a particlar market is using something, it doesn't mean they are right. (viz: Microsoft products, on the whole, are a pain in the ass.)

      --
      Heute die Welt, morgen das Sonnensystem!
    4. Re:or (3) pkg-add -r postgresql7 by Corydon76 · · Score: 1, Informative
      Speak for yourself. I find that setting up and working with MySQL is easier than PostgreSQL.

      Consider how you find the names of all the tables in a database:

      On MySQL: SHOW TABLES

      On Informix: SELECT tabname FROM systables

      On PostgreSQL: SELECT relname FROM pg_class WHERE reltype='r'

      Now if you hadn't known about the structure of pg_class beforehand and done considerable digging into the documentation, you'd be lost. A newbie even more so. Shouldn't something so simple be easy to do?

    5. Re:or (3) pkg-add -r postgresql7 by nsayer · · Score: 2, Informative
      # On PostgreSQL: SELECT relname FROM pg_class WHERE reltype='r'

      Or just \d (if you're using psql).

    6. Re:or (3) pkg-add -r postgresql7 by MattRog · · Score: 2, Informative

      The problem is that, since people don't know the fundamentals of relational theory they don't know they don't need the 'features' (which in my mind, are a requirement).

      This is why those of us that do know get flapped when those that don't tell us it is not necessary. See the problem?

      --

      Thanks,
      --
      Matt
    7. Re:or (3) pkg-add -r postgresql7 by ViVeLaMe · · Score: 3, Informative

      and let's not forget VACUUMDB.
      Want to claim back all this space lost when you deleted something? guess what, you'll have to lock your database. greeeaaat.

      And it's so sloooooooow that now i have to dump/restore the DB every week.

      And don't even mention database replication: you can do that on mySQL (with the logs), while the postgreSQL team is still struggling with this one.

      --
      i had a sig, once..
    8. Re:or (3) pkg-add -r postgresql7 by lowmagnet · · Score: 1

      On IFX, to show tables you would use the dbaccess. You also use it to write and store queries, debug, etc. It's very easy to use, and even a novice could grok that.

      By far, the easiest database to use is SQL Server. This is half because 'database' classes train in Access, and MSFT modeled SQL Server partially around the Access design. This means a left hand pand showing all your tables. No typing needed.

      Please note that this is not an endorsement for SQLServer, but merely a statement of opinion. The server is a pig, it only runs in certain configurations well, etc. It is not as flexible as PostgreSQL or MySQL by any stretch.

      --
      Heute die Welt, morgen das Sonnensystem!
    9. Re:or (3) pkg-add -r postgresql7 by Ragica · · Score: 1
      Or select * from pg_tables; if you really want to. \d and the variations thereof are the quickets choice though. Use \? from psql to see what's available.

      A lot of mysql people seem to complain about the lack of the nonstandard "show tables" type commands in postgresql. But "show tables" being non-standard means you had to read the documenation to find that. If you read the postgresql documentation also instead of expecting postgresql to have the mysql non-standard extensions you'd find that in fact postgresql is much more flexible and powerful when it comes to finding system information.

    10. Re:or (3) pkg-add -r postgresql7 by Ragica · · Score: 1
      Only "vacuum full" currently locks tables. Normal vacuums do not lock tables. If you need to reclaim space on your HD that often you have other problems, and postgresql probably isn't suited to your limited resources.

      As to your speed problems, you must have other problems. We run billing databases on postgresql and they are in no way slow.

    11. Re:or (3) pkg-add -r postgresql7 by ViVeLaMe · · Score: 1

      the database in itself isn't slow. That is, unless a vacuum full isn't done regularly, in which case it comes to a crawl. Vacuum Full is quite slow too, and does lock the whole database, which is quite infortunate when it powers a website which is supposed to be updated 24/24... So i can definitely see why a website operator would choose mySQL over PG (if he don't need transactions, for exemple.)

      --
      i had a sig, once..
    12. Re:or (3) pkg-add -r postgresql7 by MattRog · · Score: 1

      Oops, I got too mixed up in the verbiage and messed it up:

      The problem is that, since people don't know the fundamentals of relational theory, they don't know what the 'features' are (which in my mind are requirements) - so how can they effectively decide whether or not they are important?

      --

      Thanks,
      --
      Matt
    13. Re:or (3) pkg-add -r postgresql7 by Christian+Smith · · Score: 1

      (if he don't need transactions, for exemple.)

      Although I think MySQL 4.0 has added transactions anyway (I may be wrong,) you may as well just have written:
      (if he doesn't care if his data is correct.)

      I don't understand why people be-little transaction support. It is possibly the single biggest reason to use PG over MySQL. You can throw more hardware at a slow database, but you can do nothing for corrupt data (not that PG is slow!)

    14. Re:or (3) pkg-add -r postgresql7 by Corydon76 · · Score: 1
      But the documentation on MySQL is also better; SHOW TABLES can found with little to no trouble. On the other hand, finding the pg_class information was a pain in the neck. Not only was the information (that I found anyway) not on the PostgreSQL site, it was buried several levels deep in a forum posting.

      While this isn't making any points on how good a database is, if I can't find the documentation without Googling all over the place, it isn't perfect for me.

  5. cd ... wouldn't fit in the subject 8) by DrSkwid · · Score: 1

    thanks for theinfo though, tsearch looks pretty useful for my stuff & ltree sounds intreaguing (if you'll excuse the pun)

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  6. linux threads on freebsd -release or -stable by JDizzy · · Score: 4, Interesting

    Given that FreeBSD -current 1:1 threads are not 100% yet, the native FreeBSD threads will not grant the optimal performance compared to the linux threads. Yahoo probably uses a RELEASE version, or a -STABLE version of FreeBSD on their production systems, so the KSE probably isn't an option anyways. Once KSE is finished, I'm sure we will reviste the "FreeBSD V. Linux" threads war again. No granted I'm a bit biased toward FreeBSD, but I think that since the same folks control the LIBC taht are also creating the KSE (kernel scheduled Entities, aka kernel aware threads) that FreeBSD will have a bit tighter integration when all things are said and done.

    --
    It isn't a lie if you belive it.
  7. Grief stricken developer laments: FreeBSD is Dead by Anonymous Coward · · Score: -1, Troll
    The End of FreeBSD

    [ed. note: in the following text, former FreeBSD developer Mike Smith gives his reasons for abandoning FreeBSD]

    When I stood for election to the FreeBSD core team nearly two years ago, many of you will recall that it was after a long series of debates during which I maintained that too much organisation, too many rules and too much formality would be a bad thing for the project.

    Today, as I read the latest discussions on the future of the FreeBSD project, I see the same problem; a few new faces and many of the old going over the same tired arguments and suggesting variations on the same worthless schemes. Frankly I'm sick of it.

    FreeBSD used to be fun. It used to be about doing things the right way. It used to be something that you could sink your teeth into when the mundane chores of programming for a living got you down. It was something cool and exciting; a way to spend your spare time on an endeavour you loved that was at the same time wholesome and worthwhile.

    It's not anymore. It's about bylaws and committees and reports and milestones, telling others what to do and doing what you're told. It's about who can rant the longest or shout the loudest or mislead the most people into a bloc in order to legitimise doing what they think is best. Individuals notwithstanding, the project as a whole has lost track of where it's going, and has instead become obsessed with process and mechanics.

    So I'm leaving core. I don't want to feel like I should be "doing something" about a project that has lost interest in having something done for it. I don't have the energy to fight what has clearly become a losing battle; I have a life to live and a job to keep, and I won't achieve any of the goals I personally consider worthwhile if I remain obligated to care for the project.

    Discussion

    I'm sure that I've offended some people already; I'm sure that by the time I'm done here, I'll have offended more. If you feel a need to play to the crowd in your replies rather than make a sincere effort to address the problems I'm discussing here, please do us the courtesy of playing your politics openly.

    From a technical perspective, the project faces a set of challenges that significantly outstrips our ability to deliver. Some of the resources that we need to address these challenges are tied up in the fruitless metadiscussions that have raged since we made the mistake of electing officers. Others have left in disgust, or been driven out by the culture of abuse and distraction that has grown up since then. More may well remain available to recruitment, but while the project is busy infighting our chances for successful outreach are sorely diminished.

    There's no simple solution to this. For the project to move forward, one or the other of the warring philosophies must win out; either the project returns to its laid-back roots and gets on with the work, or it transforms into a super-organised engineering project and executes a brilliant plan to deliver what, ultimately, we all know we want.

    Whatever path is chosen, whatever balance is struck, the choosing and the striking are the important parts. The current indecision and endless conflict are incompatible with any sort of progress.

    Trying to dissect the above is far beyond the scope of any parting shot, no matter how distended. All I can really ask of you all is to let go of the minutiae for a moment and take a look at the big picture. What is the ultimate goal here? How can we get there with as little overhead as possible? How would you like to be treated by your fellow travellers?

    Shouts

    To the Slashdot "BSD is dying" crowd - big deal. Death is part of the cycle; take a look at your soft, pallid bodies and consider that right this very moment, parts of you are dying. See? It's not so bad.

    To the bulk of the FreeBSD committerbase and the developer community at large - keep your eyes on the real goals. It'

  8. *BSD is dying by Anonymous Coward · · Score: -1, Troll
    It is official; Netcraft now confirms: *BSD is dying

    One more crippling bombshell hit the already beleaguered *BSD community when IDC confirmed that *BSD market share has dropped yet again, now down to less than a fraction of 1 percent of all servers. Coming on the heels of a recent Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as fittingly exemplified by failing dead last in the recent Sys Admin comprehensive networking test.

    You don't need to be a Kreskin to predict *BSD's future. The hand writing is on the wall: *BSD faces a bleak future. In fact there won't be any future at all for *BSD because *BSD is dying. Things are looking very bad for *BSD. As many of us are already aware, *BSD continues to lose market share. Red ink flows like a river of blood.

    FreeBSD is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time FreeBSD developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: FreeBSD is dying.

    Let's keep to the facts and look at the numbers.

    OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of NetBSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.

    Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.

    All major surveys show that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS dilettante dabblers. *BSD continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *BSD is dead.

    Fact: *BSD is dying

  9. a gruesome autopsy: Why FreeBSD Died by Anonymous Coward · · Score: -1, Troll
    The End of FreeBSD

    [Note: in the following text, former FreeBSD developer Mike Smith gives his reasons for abandoning FreeBSD]

    When I stood for election to the FreeBSD core team nearly two years ago, many of you will recall that it was after a long series of debates during which I maintained that too much organisation, too many rules and too much formality would be a bad thing for the project.

    Today, as I read the latest discussions on the future of the FreeBSD project, I see the same problem; a few new faces and many of the old going over the same tired arguments and suggesting variations on the same worthless schemes. Frankly I'm sick of it.

    FreeBSD used to be fun. It used to be about doing things the right way. It used to be something that you could sink your teeth into when the mundane chores of programming for a living got you down. It was something cool and exciting; a way to spend your spare time on an endeavour you loved that was at the same time wholesome and worthwhile.

    It's not anymore. It's about bylaws and committees and reports and milestones, telling others what to do and doing what you're told. It's about who can rant the longest or shout the loudest or mislead the most people into a bloc in order to legitimise doing what they think is best. Individuals notwithstanding, the project as a whole has lost track of where it's going, and has instead become obsessed with process and mechanics.

    So I'm leaving core. I don't want to feel like I should be "doing something" about a project that has lost interest in having something done for it. I don't have the energy to fight what has clearly become a losing battle; I have a life to live and a job to keep, and I won't achieve any of the goals I personally consider worthwhile if I remain obligated to care for the project.

    Discussion

    I'm sure that I've offended some people already; I'm sure that by the time I'm done here, I'll have offended more. If you feel a need to play to the crowd in your replies rather than make a sincere effort to address the problems I'm discussing here, please do us the courtesy of playing your politics openly.

    From a technical perspective, the project faces a set of challenges that significantly outstrips our ability to deliver. Some of the resources that we need to address these challenges are tied up in the fruitless metadiscussions that have raged since we made the mistake of electing officers. Others have left in disgust, or been driven out by the culture of abuse and distraction that has grown up since then. More may well remain available to recruitment, but while the project is busy infighting our chances for successful outreach are sorely diminished.

    There's no simple solution to this. For the project to move forward, one or the other of the warring philosophies must win out; either the project returns to its laid-back roots and gets on with the work, or it transforms into a super-organised engineering project and executes a brilliant plan to deliver what, ultimately, we all know we want.

    Whatever path is chosen, whatever balance is struck, the choosing and the striking are the important parts. The current indecision and endless conflict are incompatible with any sort of progress.

    Trying to dissect the above is far beyond the scope of any parting shot, no matter how distended. All I can really ask of you all is to let go of the minutiae for a moment and take a look at the big picture. What is the ultimate goal here? How can we get there with as little overhead as possible? How would you like to be treated by your fellow travellers?

    Shouts

    To the Slashdot "BSD is dying" crowd - big deal. Death is part of the cycle; take a look at your soft, pallid bodies and consider that right this very moment, parts of you are dying. See? It's not so bad.

    To the bulk of the FreeBSD committerbase and the developer community at large - keep your eyes on the real goals. It's wh

  10. Elegy for *BSD by Anonymous Coward · · Score: -1, Troll

    Elegy For *BSD


    I am a *BSD user
    and I try hard to be brave
    That is a tall order
    *BSD's foot is in the grave.

    I tap at my toy keyboard
    and whistle a happy tune
    but keeping happy's so hard,
    *BSD died so soon.

    Each day I wake and softly sob
    Nightfall finds me crying
    Not only am I a zit faced slob
    but *BSD is dying.

  11. OpenBSD, too by chrysalis · · Score: 4, Informative

    Please note that on 3.3-STABLE and -current, MySQL is also finally extremely stable on OpenBSD, with native threads.

    A lot of threading-related work has been made during the 3.3 development cycle and there are no more unexpected crashes with this sort of apps. For instance the new threading code solved all issues I had with the Oops proxy, that is now very stable on production servers.

    --
    {{.sig}}
  12. Time to make world by xA40D · · Score: 2, Informative

    The article mentions that some things have been fixed in 5.0. Which could make some feel that upgrading to 5.0 would be a smart idea. However, FreeBSD hackers, being a conservative bunch, would disagree.

    Thankfully, any worthwhile fixes in CURRENT will usually be backported to the STABLE. For example:

    From the article:
    The problem of MySQL occasionally thinking that all databases had vanished resulted from FreeBSD's non-threadsafe implementation of realpath().

    CVS log for src/lib/libc/stdlib/realpath.c
    MFC: make realpath thread-safe.

    So personally me thinks a make world would be an idea sometime soon.

    --
    Do you mind, your karma has just run over my dogma.
  13. What's that smell? by Anonymous Coward · · Score: -1, Troll
    Did something die?

    It smells like something is dead.

  14. Hard Times for *BSD by Anonymous Coward · · Score: -1, Troll
    So why now? Why did *BSD fail? Once you get past the fact that *BSD is fragmented between a myriad of incompatible kernels, there is the historical record of failure and of failed operating systems. *BSD experienced moderate success about 15 years ago in academic circles. Since then it has been in steady decline. We all know *BSD keeps losing market share but why? Is it the problematic personalities of many of the key players? Or is it larger than their troubled personalities?

    The record is clear on one thing: no operating system has ever come back from the grave. Efforts to resuscitate *BSD are one step away from spiritualists wishing to communicate with the dead. As the situation grows more desperate for the adherents of this doomed OS, the sorrow takes hold. An unremitting gloom hangs like a death shroud over a once hopeful *BSD community. The hope is gone; a mournful nostalgia has settled in. Now is the end time for *BSD.

  15. Re:or portupgrade -RN postgresql7 by GodOfNothing · · Score: 1

    Of course you first have to install portupgrade itself. Also despite the name it'll do ports, packages, upgrades, installs and of course (most importantly) will upgrade ports where make fails because the port you're upgrading is listed as a dependancy for other ports.

  16. Elegy for *BSD by Anonymous Coward · · Score: -1

    Elegy For *BSD


    I am a *BSD user
    and I try hard to be brave
    That is a tall order
    *BSD's foot is in the grave.

    I tap at my toy keyboard
    and whistle a happy tune
    but keeping happy's so hard,
    *BSD died so soon.

    Each day I wake and softly sob
    Nightfall finds me crying
    Not only am I a zit faced slob
    but *BSD is dying.

  17. Anticipatory scheduler by placiBo · · Score: 2, Interesting

    I'd like to see similar comments running the anticipatory scheduler for Linux and a quad processor SMP box vs FreeBSD. Thats where the differences in SMP performance and the threading implementation will show.

  18. Elegy for *BSD by Anonymous Coward · · Score: 0

    An Elegy For *BSD


    I am a *BSD user
    and I try hard to be brave
    That is a tall order
    *BSD's foot is in the grave.

    I tap at my toy keyboard
    and whistle a happy tune
    but keeping happy's so hard,
    *BSD died so soon.

    Each day I wake and softly sob
    Nightfall finds me crying
    Not only am I a zit faced slob
    but *BSD is dying.