Middle School

The last time I bought a laptop for myself was in 7th grade, 2001. I was 13 and I used all my savings to buy a $3,700 Dell Inspiron 8100 running a Pentium 3 processor with a whopping 512mb of ram, a 64mb graphics card, and a gigantic 60gb hard drive. What an incredible machine this was.

eBay

Finally it’s time I buy myself a new computer. I recently acquired an Alienware M17x that’s pretty high end, but I’m not a gamer, so I’m selling it on eBay and am going to use the cash to finance the purchase of a brand new Dell Studio 1747. This was my first time selling something big on eBay, and at first I screwed up quite a bit — I listed it at $2,200, which is the price I want in the end for it. No one bid (except for a Romanian scammer offering me $3,500), and a friend of mine convinced me to list it at $0.01 – one penny – with no reserve price, and let the market determine its value. I was weary, but so far the auction has gotten to $1,500, which I’m pretty pleased with. eBay is addictive though — I constantly monitor the auction to see how much I’m going to be receiving. It’s taken me over; it’s awful. I must never play the stock market for this reason. To satisfy my obsession with the bidding, I’ve hacked together in a minute a short python script running in screen that sends me a text message every time the bid increases:

#!/usr/bin/env python
import urllib2
import os
import time
last = 0
while True:
        print "Checking auction at %s:" % time.asctime(),
        page = urllib2.urlopen("http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=230409562381").read()
        index = page.find("US $") + 4
        now = int(page[index:page.find(".", index)].replace(",", ""))
        print now
        if now > last:
                os.system("echo 'As of %s, auction is at %s' | sendmail MYTELEPHONENUMBER@txt.att.net" % (time.asctime(), now))
                last = now
        time.sleep(45)

Aye yie yie.

The Specs

But I’m quite excited about the new laptop I’ve ordered:

The specs are:

  • Intel Core i7 820QM 1.73GHz (3.06GHz Turbo Mode, 8MB Cache)
  • 8GB ram, DDR3, 1333MHz, 2 DIMM
  • ATI Mobility Radeon HD4650 with 1GB ram
  • Two 500GB 7200rpm hard drives
  • 17.3in 1920×1080 Screen
  • BluRay Burner
  • 4 Year CompleteCare Warranty

With an awesome discount by asking the phone sales manager’s manager’s manager, this all cost before tax $2,350. Still expensive, but I’m hoping that eBay auction will mostly pay for it.

The Interesting Part: Configuration

So while I wait for the new machine to arrive, I have to start planning what I’m going to put on it, and how I’m going to do it.

It has a fast processor and a lot of ram. It seems, however, that it has more ram than processor, in a sense. What I mean is that with 8 gigs of ram, it seems like I might as well keep all programs running at all times. The problem could be though – maybe too many idle processes will gradually eat away at CPU. I’m not sure. Will it?

What do you think? With so much ram, I also need to decide what I’m going to do about swap/hibernation. Do I use a separate partition of 4gigs for swap? Or do I go with the swapfile approach? Or do I not even use a swap at all, because 8gigs of ram is a lot? For hibernation, do I use what’s in 2.6.32 by default or do I patch in TuxOnIce? Decisions, decisions.

I’ll probably go with Gentoo, because it’s customizable and I’ve used it for years. It has its shortcomings, however, and I’m curious about Exherbo, which claims to do what Gentoo does but better, or a customizable binary distro like Arch, or maybe even make the huge leap to an advanced popular distro like Fedora. I’ll probably just stay with Gentoo though, unless somebody can make a really good case to do otherwise. Flamewars, commence.

Of course, I’ll be using KDE SC 4.4 Beta 2 by the time the computer arrives. By the way, I hate adding the “SC” in there, but I think PlanetKDE would come after me if I neglected it. Branding shmanding. But anyway, KDE should fly on the new machine.

The wifi card supports 802.11n, but is unfortunately one of the Broadcom cards that is only supported by the hybrid-proprietary wl driver. Also, in my experience, FGLRX, ATI’s proprietary driver, outperforms RadeonHD by a long shot, so I’ll be using FGLRX too. Shucks. At least ATI’s own John Bridgman has pointed us to a solution for the KWin resizing compositing problem.

The Big Issue: Data Organization

The biggest issue, however, is what I am going to do with 1TB of hard drive space. How do I divide it up? The breakdown of the situation is this:

Storage:

  • Internal 500gb
  • Internal 500gb
  • External 500gb (via USB2)
  • Online server with lots of gb (via ssh+rsync)

Data:

  • 26gb of pictures (and growing)
  • 67gb of music
  • 2gb of code
  • 1gb of documents
  • 15gb of protools archives
  • 10gb of goofy home videos from middle school
  • 1gb of old school work
  • 2gb of middle school junk archives
  • 1gb of old code projects
  • 300gb of downloaded junk

So what are my options for all of this? First of all, which file system? I’ll probably go with ext4, because it seems like the best you can get on Linux right now. How do I organize the data? Some possible schemes are:

  • Many operating systems on Internal1, all data on Internal2, data backed up to both Online and External
  • Linux in Internal1 along with main data (pics, docs, music, code), with downloaded junk on Internal2, and archives of old stuff on External, with important stuff backed up to Online
  • Linux in Internal1 along with main data (pics, docs, music, code), with downloaded junk and archives of old stuff on Internal2, with important stuff backed up to both Online and External
  • Use LVM to concatenate the two drives
  • Use LVM for RAID-1
  • Use LVM for RAID-0
  • Use LVM for RAID-10

What else? What do I do here?!?

I’m really not quite sure. What do you think? What else should I be thinking about? Location of home directory? The additional power consumption of a second HD and hdparm -Y? I want to configure this system perfectly; I need all the help I can get.

December 13, 2009 · [Print]

40 Comments to “New Laptop for the First Time Since 2001”

  1. wings says:

    with windows :/(

    shame :-(

  2. @wings
    What’s with Windows? I’m not sure I understand your comment. Imma put Linux on the new laptop.

  3. CoolGoose says:

    Imho it’s always good to have a swap file / partition even if you have a lot of ram because “shit” can happen.

    Can you do hardware raid 1 on those two drives ?
    You could partition those with 50GB for / and the rest for /home and backup periodically on the external drive :) .

  4. @CoolGoose
    What kind of “shit” can happen? What do you mean?

    Probably only software raid, but I’m not sure- I need to check. This would be very secure and fast, but then my disk space would be split in two.

  5. Girish says:

    Good specs :-) How heavy is it?

  6. Andras says:

    I have 8GB of memory. And I run out of free memory at least once because of leaking Xorg. If you constantly suspend/resume, this will happen. I also use a swap, don’t know how would it be without.
    Unfortunate, but KDE with Linux can make a quad core 8GB machine to feel slow from time to time. :(

    • I don’t think I’ve experienced such a memory leak. Is this well known or just a nuance you have?

      • Andras says:

        Leaking Xorg is an experience, you just have to watch the memory usage over a longer time. If it is Xorg itself, the driver (nvidia binary) or applications leaking X resources, I’m not sure. The above case happened a few months ago and I didn’t try to find the cause as I needed a working computer and it was so slow due to swapping, that I did an ugly hard reset.

        • This actually makes me think I shouldn’t use a swap file. For run away processes that keep hogging ram, the ram is filled up very fast and then the system is ground to a halt as soon as it starts swapping t o disk, and a hard restart is required. If I didn’t have a swapfile, the OOM killer would just kill the hogging process as soon as the ram filled up!

  7. g111 says:

    I have read (search the web) that with kernel 2.6 (different than with 2.4) a swapfile is as fast as a swap partition. But you have the advantage of better being able to resize it if required. So I would recommend to use a swapfile. A swap partition only for hibernation.

    • That’s a good point. I know TuxOnIce can hibernate to a file… Can the hibernation packaged with the kernel also do the same?

      • vespas says:

        I think it can, but make sure your grub/initrd et al can boot from it properly (opensuse currently can’t). there is a lot of relevant info by the eee-pc guys that use swapfiles that can be turned on and off to avoid wearing out the ssd.
        I would definitely create a swap partition since you have so much disk space, maybe 10Gb (come on, it’s 1%!) and forget about it. the kernel is smart enough to know when to use it. and if you wait for the oom killer to take care of your processes, you are asking for trouble; imo it is a last resort measure to avoid a hard reset. the “i don’t have to close applications due to a lot of ram” argument isn’t very sound: I said the same for my P1-200 with 64Mb ram… :) I mean it only lasts so long; imagine using digikam to index your gb’s of images, strigi for 500gb of downloads, etc. ok, things aren’t so tight as before but you definately have to close applications. logging out every now and then takes care of a lot of loose ends…
        have fun!

        • Ten gigs of swap is a lot… I thought the rule of thumb was half your ram.

          Right now on my current system with 3 gigs of ram, I have tons of apps and tabs open, and I’m only using 1 gig of ram and am not swapping at all.

          Apps open:
          25 Chromium tabs
          Pidgin
          OpenOffice
          Kate
          QtCreator
          Konsole
          Kmix
          Klipper
          KDE4 (plasma, services…)
          That ebay python script
          Some other little things

          So I dunno if I really need swap with 8 gigs. Hmmm…

  8. ikkefc3 says:

    I see you are not planning to use Linux on it (because you put an ATi card in it).
    Are you going to use Windows or Mac OS X?

    • You must have misread the article. I plan to use Linux.

      • ikkefc3 says:

        You must have misplaced your order. I clearly read:
        ATI Mobility Radeon HD4650 with 1GB ram

        • Gusar says:

          ikkefc3, I think you’ve missed all the open source development regarding ATI. Sure things might not be completely ready right at this minute, but it’s just a matter of months really. The kernel stuff for ATI cards is planned to leave staging with the next kernel release.

          @Jason: The only reason I’d advise you to go with Arch instead of Gentoo is compile times. But with the monster you’re buying, compile times won’t be a nuisance, so I’d just go with Gentoo if I were you.

          • ikkefc3 says:

            Thank you!
            Thanks to your comment, I tried Ubuntu 9.10 on a pc with an ATi card (HD 3300, the dedicated nvidia card is currently in repair), and man, what a difference between now and when I tried it about a year ago! Everything is working smooth! Although I must say it’s using the FGLRX driver.

        • d2kx says:

          Due to AMD’s opensource strategy, a Radeon card is pretty much the best thing you can buy. Have a look at xorg-edgers PPA.

          • STiAT says:

            I’ve a laptop with a Intel 4500 HD and I’m also satisfied with it. I think that depends on the needs you have, I don’t really need a fast graphics card, and the Intel driver isn’t lacking that much anymore.

            But yea, my next one will probably also have some radeon mobility inside.

  9. z says:

    Dell studios are crap, I bought one five months ago and it had a broken screen (in that it twisted all the colors like a film negative) on arrival. Dell told me it’d take them a week to replace it (even though I had waited for two weeks before I got the freaking laptop), I said no, asked for a refund, walked to an Apple premium reseller and bought a macbook instead. Best thing I ever did in my life, the unibody case feels much stronger and safer than the flimsy plastic of the dell studio and the laptop lasts up to five hours in continuous use (maybe up to seven hours if you tone down the screen backlights, switch the keyboard lights off and so on)

    Sure, the specs of the dell are better if you compare dollar-to-dollar but at the cost of service and quality. It just ain’t the same.

    • Luke says:

      I picked up a Studio 1555 this summer. It’s a lovely, robust piece of equipment. Quite frankly, it’s the best laptop I’ve ever owned. No stupid hardware flaws, no problems with coming out of standby…. It just works very well.

      I’m getting about 6hrs 20mins on a charge with a power-saving profile at the moment.

      Don’t blame the quality of the machine for destruction caused by UPS/FedEX/etc. They can break anything :D

  10. z says:

    I forgot to mention, the Dell hotlines are the worst thing I ever had to deal with on the phone. The dell hotlines are outsourced in thirdworldia and their accent is TERRIBLE, you have to make them repeat every line they say before you can make any sense out of it, not to mention their creeping incompetence (they didn’t have the serial number of my laptop registered in their database which was the cause for the delay before they could repair my laptop. What the flying fuck !)

  11. Andreas Nilsson says:

    My last experience with ati wasn’t very uplifting, but that was a while back.

    I’d go with a Lenovo Thinkpad for quality… But this machine should be nice performance wise. If you go with linux I personally recommend a swapfile(s), as it allows to vary the amount of swap. You really should have some swap, otherwise a make -j in /usr/src/linux/ will bring down the computer rather quickly :)

    Ext4 as a fs may cause dataloss, i’d not recommend it. Stick with something that works and ext3 is upgradeable to ext4 should it be stable in the future. You might choose something a bit more optimized for small files for /usr/portage.

    If you care about the data using raid1 is worth it. You might even make it a 3way mirror where the 3 drive is you external disk. Maybe using a 32gb partition for / and the rest for /data

    • I thought ext4 was pretty stable now a days… I’ve been using it since its first release and haven’t had any issues.

      A 3 way mirror… that’s an interesting idea. Can I make it so that the external drive is mirrored only when it’s plugged in? To effectively have an automatic lvm backup system on demand?

  12. Franck S. says:

    on my quad core AMD system, I also have dual 500gig.
    I partitioned them as follow with software raid:

    sda:
    /boot:156 MB
    raid (->md0): 63GB
    raid (->md1): 9.7 GB
    raid (->md2): 392 GB

    sdb:
    raid (->md0): 63GB
    raid (->md1): 9.7 GB
    raid (->md2): 392 GB

    raid:
    /home: md2 (Reiser) raid 1
    [swap]: md1 (Swap) raid 0
    / : md0 (Reiser) raid 0

    I’m really happy of this set up. It gives nice read speed and redundancy on /home, and top performance on both read/write everywhere else (at expense of security, but I don’t mind losing system data.)

    I also set up a build directory in /usr/build so that compilation takes advantage of raid 0.
    # hdparm -tT /dev/md0
    /dev/md0:
    Timing cached reads: 6314 MB in 2.00 seconds = 3157.35 MB/sec
    Timing buffered disk reads: 522 MB in 3.00 seconds = 173.77 MB/sec
    # hdparm -tT /dev/md2
    /dev/md2:
    Timing cached reads: 6132 MB in 2.00 seconds = 3066.72 MB/sec
    Timing buffered disk reads: 310 MB in 3.02 seconds = 102.60 MB/sec

    (both disks are ST3500418AS barracudas)

    HTH.

    • Franck S. says:

      ( sorry, I forgot closing the bittorrent client before testing I/O speed…
      this should be closer to real figures, though I’m not sure I removed all I/O activity:
      md0: Timing buffered disk reads: 722 MB in 3.00 seconds = 240.42 MB/sec
      md2: Timing buffered disk reads: 358 MB in 3.00 seconds = 119.19 MB/sec)

    • This is a really interesting setup. I will definitely consider it. Why do you have 20 gigs of swap space? Seems like an awful lot.

      • Franck S. says:

        I agree it is far too much. I don’t remember more than a 1/5th of it ever being used, even in the most adverse conditions. I’d probably make that 8 gigs if I had to do it again.

  13. Ryan says:

    Well… you could try RAID0 although it might be a bit scary with no error checking or error recovery. Personally, I would dual boot Windows 7 and Linux, but I also play games so thats probably my main reason. Actually, the other reason for me would be so that I would have Microsoft Office. Yes, I’ve heard the argument “OpenOffice does everything Microsoft Office does!” so many times, but in all honesty… it can do everything MS Office does but not as well. And since the majority of people use MS Office, formatting gets fucked up when going between programs.

    What I would probably do is this:

    Install operating systems to Internal1. Put music, code, pictures, etc on Internal2. Put torrents and movies on External.

    Ryan

    • Jason says:

      Thanks a lot for the suggestions.

      Yeah Raid0 seems scary. I think LVM (linux volume manager) might support RAID5 or 6 without the need for a dedicated hardware controller. There’s also the option of concatenation instead of striping, which is safer with no error recovery, but then I don’t get the increased performance from continuous reads. Given that concatenation or some kind of safer RAID might be an option, what reason would I have to keep the partitions separate? Power management? Multi-OS? I’m not sure.

      I don’t game much, and when I do, all the steam games I want run perfectly under wine now a days, for real. In fact, MSOffice also runs with 0 hitches on Wine with Linux now a days too: http://appdb.winehq.org/appimage.php?iId=19988 . The project has come a long way. In any case, I’ve been using open office exclusively on my linux box for about 5 years now, and I really do think that OpenOffice can do things as well as MSOffice, and some things even better too. The only drawback is that the docx import/export is bad, but the doc export/import is perfect, so that’s not problem. Besides, I hate the ribbon in new office… I can’t find anything!

      I guess the big reason for me to install Windows7 would be for Windows development, for my job and for making viruses (research only!). Other cross platform coding I can do from Linux via Qt. At this point I’m leaning away the multi OS idea because I have a MacBook and Dell Latitude (Win7) from work that suit my Windows/Mac experimentation/compilation purposes. Thank god for Windows 7 though… it’s not perfect, it’s not KDE, but at least it’s a usable version of Windows with a more modern kernel than XP.

      Anyway, thanks for your suggestion. I’ll still consider dual booting for the “just-in-case” reason.

  14. John says:

    I would go with Ext4, LVM and dedicate it all to Gentoo. Probably 20
    GB (you have plenty of space) for /, 128 MB for /boot and there rest
    for /home. You should have all you’re files backed up to other places
    anyway. So using both disks as a single volume will be fine.

    As for why Gentoo. You’ve been using it for years. You’re happy with
    it. You know it. You’ve tried other distros and have always come back
    to Gentoo. Other distros aren’t going to provide you with any
    advantages over Gentoo.

    Ext4 because it’s stable. It’s here to stay. It’s modern. Well
    maintained. It doesn’t take ages to run the file system check every 30
    odd boots (5 seconds for my 100 GB drive so maybe a minute for 1 TB).
    Mainly, it’s stable.

    From what I can tell you don’t actually need Windows and anything you
    would use it for you should be fine running it in a Virtual Machine.
    You’re not a heavy gamer and you’ve already said Wine plays the games
    you want just fine.

    • John says:

      > How do you feel about swap? Swap partition? Swap file? No swap at all cuz 8
      > gigs is a lot of ram?
      >
      I have 2 GB and I rarely swap. On those rare cases I do I restart
      because using swap is unbearably show.

      > Yeah, but compilation time is a pain. I was thinking about maybe Arch.
      > Or if Gentoo is aging but I like source-based, I was thinking about
      > Exherbo….
      > You’re probably right though – I’ve been using Gentoo for so long.
      >
      You’re getting a core i7 with turbo mode up to 3.0 GHz with 8 GB of
      ram and you’re complaining about compile time?

      Arch, Is nice enough. However I know you will have problems with the
      lack of use flags. The packages have been compiled with certain option
      and thus have certain dependencies. If you don’t like it in most cases
      you can recompile it yourself and in a few you’re stuck with their
      choices. It’s a fast distro with a decent community. It offers a lot
      of the down to the metal, configure it yourselfness of Gentoo. But
      again it’s still binary. You’re going to fall into one of three
      groups. Happy with how it works. Unhappy and re compiling everything.
      Unhappy and not compiling anything. It does have a source build system
      but it’s no where near the level of Gentoo’s because it is an after
      though. Oh and all non official packages (think overlay) from AUR have
      to be compiled. So the time savings might be none because you have to
      use their lesser source build tools to build and rebuild a large
      number of packages.

      For Exherbo, Ciaran is all I have to say. You can/have your own
      opinion about the guy and he seems to be the one running the project.

      > Have you messed with VirtualBox at all?
      >
      VirtualBox is getting better every release. It makes a good desktop
      (run a second OS on your desktop) visualization tool. It does not even
      approach the level of the commercial offering from VMWare. If all you
      need is Windows in a Window to use a few Windows apps, it’s
      sufficient. If you want a hypervisor with cross server replication and
      migration than it’s the wrong product. You probably only need the
      former so it will do everything you need. You might also look into KVM
      and libvirt.

  15. Matt says:

    While my system is not a laptop… I would advise against ext4, I have done benchmarking between xfs, ext3, and 4 and when used in my configuration (fully encrypted root) the system was unusable because every 5 seconds when it would flush the journal to disk my entire system would hang. Note that under these circumstances, all 4 cores were being used for encryption, though not all at 100%, and I was streaming writes to disk at 60 MB/sec. You can also see this issue if you install Debian using their default fully encrypted root with ext3. It is unusable.

    Switching to XFS, the problem went away completely. Also, when used with LVM, XFS will match the block size of the LVM, so you can get great performance.

    I have 2x 500 GB drives inside. I am using Gentoo Linux, and software RAID-10. Yes, mirrored and striped with 2 disks. For reading, this is like having a RAID-0 on the fastest halves of each drive, and for writing, you don’t really see any improvement over a single disk. The second half of each disk is also a RAID-0, but swapped, so each disk still contains a full copy of the data. With 2x 7200.12′s I see streaming reads of 240 MB/sec. Sure you won’t get a full TB of storage, but you will have both speed and redundancy. Then use your external drive for backups.

    For the Linux side of things, I would set it up that way. See if you can use Parallels or VMware to run your Windows stuff inside of Linux, then you will benefit from the RAID-10 setup, something which Windows will not allow you to do.

    As far as getting OS X on there… I tried to make the system into a hackintosh, but it proved too much trouble, and I was going for reliability, so a hacked OS was out of the question. Supposedly QEMU and KVM have patches to run Retail Snow Leopard under emulation, but I haven’t tried that out yet.

    I have been most impressed with XFS on Gentoo.

    • Matt says:

      I am not sure about the block sizes of ext4, but what I did was set a 256 KB block size for both LVM and XFS, and it improved my throughput.

      Yes it means that I only have 500 GB of storage, so it acts like a halfsize RAID-0, with RAID-1 redundancy. To me, that’s the best of both worlds.

      I have not messed with VirtualBox at all. I have just been paying for Parallels, as it runs well on my MacBook Pro, and they have an office just down the street from my office. I have used the free VMware Server on a work machine, which is an i7, w/ 6 GB of RAM, and I was able to smoothly run 3 instances of Windows Server 2003 under emulation all at the same time, all with CPU at 100% (I made my own virtual cluster of machines to test distributed stuff) I am very happy with the performance. I will probably try to get OS X running under QEMU w/ KVM hardware acceleration in the future, but I have too many other projects going on at the moment.

      Does anyone know if VirtualBox supports running Retail Snow Leopard?

      For experimentation, just use an emulator to install a bunch of different Linux flavors. Then you can mess with whatever settings and filesystems you want and do some testing and benchmarking. That’s how I taught myself to set up RAID, LVM, my own initramfs, custom embedded kernel. Makes a great virtual playground, plus you can backup the virtual disk when you want to try something daring, like using dd to overwrite one of your RAID disks and then seeing if you can recover it without nuking the good half.

  16. Samat Jain says:

    With 8 GB of RAM for a desktop machine, I’d forgo a swap partition and make a small swap file instead (512 MB or so). The Linux VM performs best if a swap partition is available, even if it is rarely used. I don’t see the point in having more swap than that—I rather it OOM or just crash immediately, rather than sit thrashing for minutes.

    With two disks and that much RAM, I’d go with LVM and Linux RAID-10. While RAID-10 has “interesting” performance characteristics, in the end you’ll get twice the disk space, and twice the throughput (in most cases).

Leave a Reply