Reducing memory usage of rsyslog

I’ve never been a big fan of rsyslog, preferring syslog-ng instead. However, I am giving rsyslog another chance. One of my biggest problems with rsyslog has been it’s high memory usage, documented by many people in many complaints that can be found using google. Now this emmory is usually, though not always, virtual and not …

Continue reading ‘Reducing memory usage of rsyslog’ »

Stumbling on cool things

I’m interested in emulators, always have been, and I was wondering if anyone had used LLVM to write an emulator. I came across this highly detailed account which was a fun read: Statically Recompiling NES Games into Native Executables with LLVM and Go It concludes stating that static recompilation is probably less practical than JIT, …

Continue reading ‘Stumbling on cool things’ »

Amazon’s new TLS library

s2n source s2n announcement I’m liking what I see, good design principles, aiming for simplicity and reviewability. I would not be surprised to see this become a huge success as people eschew the extra functionality of OpenSSL (and others) in favor of software with less security risk. Amazon’s backing is likely to propel s2n over …

Continue reading ‘Amazon’s new TLS library’ »

Important detail for Rails apps at a sub-uri

When using passenger with an app deployed to a sub-uri most details of app paths are handled automatically. However, when deploying an app the precompiled assets using helpers such as asset_path will get the wrong path because it doesn’t know about the sub-uri. The solution is to set Rails.application.config.action_controller.relative_url_root in an initializer or environment to …

Continue reading ‘Important detail for Rails apps at a sub-uri’ »

Ruby best practices: count, length, size

When to use which: Hash size and length both call RHASH_SIZE which is O(1) count is enumerable.count which is O(n) – use only with block best practice: length without block, count with block Array size is an alias for length length calls RARRAY_LEN which is O(1) count is O(n) – use only with block best practice: length …

Continue reading ‘Ruby best practices: count, length, size’ »

Performance problems with FreeTDS

So FreeTDS is the glue between a linux systems and SQL Server, among other things. For my purposes I’m mainly using it to run Rails with a SQL Server backend. My understanding is that the alternatives to FreeTDS are Microsoft’s SQL Server ODBC Driver 1.0 for Linux or, if using JRuby, Microsoft’s JDBC Driver for SQL Server. But why …

Continue reading ‘Performance problems with FreeTDS’ »

Rails Database Config Parameters for PG Gem

I’ve noted how difficult it is to get a complete list of parameters that can be used in the Rails’ config.database.yml file. I understand this is because there are different parameters for the different library layers. Still, I would like a more complete list somewhere, especially given that the parameter names can be confusingly similar …

Continue reading ‘Rails Database Config Parameters for PG Gem’ »