memmgr
June 18th, 2009ok, ok. i get the hint. i’ll blog. everyone in the channel has been clammoring for more information and i’m terrible at sharing it. the startling lack of posts is not because there isn’t anything going on, but because i’m such a crappy writer, which you either already know or will soon find out.
a lot has changed since the last blog post. some of it i’m sure you are already aware of, but some you may not be. the biggest note regarding the trunk is that we’re in testing on the .5 release now. i took time to migrate my personal domain off hula and onto bongo which has been great. i can now find and fix the bugs that we were hitting on hula. there are still some hard to find bugs, but i’m betting that the other big news will help find it.
now on to the most amazing stuff…. the new memmgr branch. this has been a major blessing for the bongo project. back in the day, Novell engineers decided to write a custom memory manager for the product. i think it was back around the NetMail 3 days. i don’t recall it being there with NIMS, but i could be wrong. anyhow, it apparently greatly increased the speed of the product on Netware. it stuck around and we got the scrubbed version via the hula project. i recall in my programming classes in college writing my own memory manager and the benefits of them, however it does make some things a bit difficult. finding memory leaks and overwrites can be a bear. tools like valgrind had a very hard time with the memory allocation system as they would see one massive alloc and not a bunch of smaller ones.
i don’t know if there will be any sort of speed improvements over the custom memory allocator, however my gut says not really (note here that i’m no expert on memory subsystems…). the amazing benefit to us is that valgrind can sensibly operate with our binaries now. i just spent time debugging bongo-config on the branch and i’m surprised we even worked before given how things were coded. i was freeing stuff then using it and valgrind was useless to find it as the custom manager didn’t return the memory to the host, but kept it for pooled use later. this will be an incredible addition to our codebase.
another major change was cmake. alex wrote a bit about the make system on his blog, but i’d like to throw my two cents in. the new system is simply amazing and quiet. don’t get me wrong, there is nothing i like more than watching gcc compile endless .c files on a friday night (which is why i use gentoo), but this is awesome. percent complete and all. along with that is the quick installs and “make distclean” being as simple as “rm -fr {SRC}/build”.
the last major change, so far, with the branch is logging. we got rid of log4c and now just have a simple syslog interface. this will be swapped with something a bit more modular and configurable in the near future, but for now it works great. just be ready for spam in your syslogs (which is another of task on my todo — fixing the log levels).
overall .5 is incredibly stable on my production server, and the branch is now running on my test server. the store is running stable against my 1.4GB 151,400 (and growing) email mailbox. expect leak fixes and other improvements over the short term!
i did have one idea the other day based off a conversation with Chris at my work. an agent that can arbitrarily add, or change, header lines. this is the lowest priority task on my list as its use would be rare, but it might be nice to have. other tasks on the plate are the re-write of queue which we’ve been talking about for a while now. we have some good ideas on this. rewriting smtpd which apart from queue is the last major section of truly legacy code. and of course we can’t forget things like bongo-manager, bongo-queuetool, and my favorite, snmp.
there are a lot of tasks there, some required, some just dreams, but all i think good ones. this is starting to get fun!