Home
netbsd improved MIPS, 2011-01-04 13:59:14 #

HEADS UP: matt-nb5-mips64 merge to HEAD

NetBSD is about to grow some improvements to MIPS-based platforms, including SMP support and other goodies mentioned in the above thread.

tags: netbsd



pkgsrc pkg_info quick tip file query, 2010-12-30 14:34:45 #
Query which pkg a file belong to from pkgsrc: (like rpm -qf)
pkg_info -Fe /usr/pkg/bin/filename

$ pkg_info -Fe /usr/pkg/bin/mysql                                                                                 
mysql-client-5.1.53

tags: pkgsrc



mk.conf - pkgsrc or bmake configuration, 2010-12-14 08:24:09 #

There's a discussion happening right now on the netbsd mailing lists concerning the location of mk.conf for NetBSD users (/etc) and non-NetBSD users (/usr/pkg/etc/mk.conf or whatever you used during bootstrap).

This thread contains a lot of stuff, but one message gives a lengthy description of mk.conf-related stuff, including hints to read this message and see a more involved conditional/logic-based config setup. (more config files should allow for if-statements, if you ask me).

Anyway, like always, the netbsd mailing lists are full of technical gems. :)

tags: netbsd



maatkit added to pkgsrc wip, 2010-12-11 23:24:50 #
Today I added maatkit to pkgsrc wip.

This is a really important tool if you're using mysql. It claims to also support postgres, but I don't know much about it so I didn't add it as a dependency.

At this stage I'm sure the pkg has plenty of problems, but it's a start. If you're a mysql user I encourage you to use mk-table-checksum, at least.

tags: pkgsrc



varnish on NetBSD, 2010-12-01 16:40:06 #

So for a while now i have been admiring varnish for its crazy speed. So I decided to add it to my system and try out a few things.

  • pkgsrc
    First I went to pkgsrc only to find varnish 2.0. I wanted the latest, varnish 2.1, so I had to upgrade that. There are also rc scripts included in there, but they're very rudimentary.
  • Next I needed to get varnish actually functioning, which required a few changes to my apache config (moving it to a different port).
    Listen 0.0.0.0:8282
    ...
    NameVirtualHost *:8282
    <VirtualHost *:8282>
    
  • Then actually setting up varnish
    #/etc/rc.conf
    varnishd=YES
    varnishd_flags="-a 0.0.0.0:80 -f /usr/pkg/etc/varnish/default.vcl -s malloc,25m"
    

    #/usr/pkg/etc/varnish/default.vcl
    backend default {
         .host = "127.0.0.1";
         .port = "8282";
    }
    
  • Now getting things to actually cache. Using google analytics means cookies are always set for everything.
    #/usr/pkg/etc/varnish/default.vcl
    sub vcl_recv {
        if (
            req.url ~ "^/static/" || 
            req.url ~ ".+\.html$" ||
            req.url ~ ".+\.js$" ||
            req.url ~ ".+\.css$" ||
            req.url ~ ".+\.jpg$" ||
            req.url ~ ".+\.gif$" 
           )
        {
            unset req.http.Cookie;
        }
    }
    

And that's pretty much it. I can keep messing around to get my hit rate up and I would like to setup different backends based on my Host headers, but otherwise I'm happy. 25MB is also really small.

tags: netbsd



0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25