70 Comments
- TruckStuff, on 07/16/2008, -6/+79Boy, that sounds like a remarkably bad idea. So when your system has a sudden loss of power, all of your logs are gone. Brilliant.
Seriosuly, if you care that little about your logs, you might as well link them to /dev/null. - pjacob, on 07/16/2008, -3/+48Better yet, symlink them all to /dev/null. Nothing beats that! :)
- databeast, on 07/16/2008, -6/+41this is retarded on so many ways. A ridiculous way to hose your system for an almost imperceptable performance increase.
I'm sure the Gentoo crowd will lap this up. - pak314, on 07/17/2008, -2/+17Never optimize something without quantifying the gains.
- LittlemanTAMU, on 07/16/2008, -1/+15This looks like a decent idea if you have a laptop and/or a solid-state hard drive which is the main point of the article, but it doesn't really seem worth the risk of losing your logs to power failure (which the article does mention as a disadvantage) on a desktop without a solid-state drive.
- inactive, on 07/17/2008, -3/+17If syslog is busy enough to be significantly affecting battery life, something is wrong.
- iofthestorm, on 07/17/2008, -1/+11RAID isn't going to help you if your system crashes for whatever reason, and your logs are still in RAM.
- Hellothere123, on 07/17/2008, -0/+9One of the greatest features of Linux is that you can modify it as much as you want.
- clickwir, on 07/17/2008, -0/+9Why not a happy medium. Writing out to the hard drive only on shutdown seems too long to go without a write out. Why not use ramlog, but make it write out every.... 10 mins. or 5 mins.... or 60 mins. Then you'll have the benefits of all the log back and forth contained to just ram and a burst every so often.
- FatBurger, on 07/17/2008, -3/+10I'd like you to meet my friend "sarcasm". Careful, he bites.
- thisguy47, on 07/17/2008, -0/+6Why take the time to be a douche when you know what he's talking about?
- TheWindBlows, on 07/16/2008, -7/+12Most of the things in linux are done for a reason this is why I feel safe not tweaking linux's parts on a good distribution.
- unpolloloco, on 07/17/2008, -0/+4isn't one of the primary purposes of a log to identify why something (i.e. the system) has crashed? If the system crashes and forces a hard restart, how exactly is one supposed to check the log data?
- DyceFreak, on 07/17/2008, -0/+4solar, the point he was trying to make is that moving logs to RAM basically defeats the purpose of logs, as if the system were to crash, the system would have ZERO logs, and requires a proper shutdown just to have the logs..
so trackstuff said if you're never going to look at them and you want increased peformance, they might as well not exhist...
what would be actually useful is if it dumped every 5 minutes or so... - McGrude, on 07/17/2008, -0/+3I did something like this on an eeePC that I installed Ubuntu on. I created a tmpfs filesystem and mounted it at /var/log. While the laptop is on you have access to the current logs, but they do not persist between reboots, nor do they write to the flash drive.
- morphie, on 07/17/2008, -0/+3"Hmm, a system crash, let me check my logs...."
...
"Oh... fsck..." - eggsovereasy, on 07/17/2008, -0/+3Better, but it seems to me that I tend to want my logs when I have an abrupt and nongraceful shutdown.
- toaster13, on 07/17/2008, -0/+3I won't say this is stupid, but there are smarter ways to do this.
If you have a solid state drive, mount /tmp and /var/log to ramdisk and send syslog to a syslog server.
On a mobile device with no guaranteed syslog server, skip step two and deal. You probably don't care after a reboot. Most mobile devices have limited storage anyway.
On a laptop, write non critical log levels (like info) to null and keep the important stuff on disk. - abhiroop, on 07/17/2008, -1/+4The performance increase is NOT why I did this. I don't like my HD to be CONSTANTLY spinning even if all I am doing is reading an article. Bit stupid really. Much better for the HD to stay cool.
- LordFate, on 07/17/2008, -0/+3So I take it your laptop has never had the battery go dead? I know many of us take heed of the time remaining to automatic shutdown but sometimes you leave a laptop unattended and the unexpected happens.
- zwaldowski, on 07/17/2008, -0/+2It already has DEBs for Ubuntu and RPMs for Fedora, Red Hat, and SUSE.
- unitedatheism, on 07/17/2008, -0/+2then you'll face a problem; flash drives are unable to handle many rewrites as magnetic ones, after many writes the flash drive becomes filled with 1s, but then we could develop a program to avoid redundant data to be stored on the flash drive, storing then on ram before, oh wait.........
- qbthemc, on 07/18/2008, -0/+2re read your statement.
- grumpyrain, on 07/17/2008, -0/+2Go to youtube and search for Dell laptop.
- BOFH139, on 07/17/2008, -0/+2Way not just use an external Syslog server?
- dbr_onix, on 07/17/2008, -0/+2Erm, the title of both the submission *and* the linked article is "Improve system performance by moving your log files to RAM"
While I agree this idea is pretty stupid in a few ways, not spinning the drives up every 10 seconds to write a recurring log message is a good thing.. but, does syslogd actually spin the drive up just to write a log entry? I half-thought the drive cache dealt with this (although I never looked into it at all) - toaster13, on 07/17/2008, -0/+1Actually, slight corrections...
* On solid state, not ramdisk, but tmpfs (same thing, but you have to create ramdisks as an additional step IIRC).
* Don't write info, etc to /dev/null. Just don't log them to begin with.
* I think syslog-ng has a buffering option as well that could assist keeping logs from spinning up a laptop drive for every message, though I could be dreaming this feature. - solarwind24, on 07/17/2008, -2/+3You are an ignorant idiot. The idea isn't to increase performance, it's to reduce disk writes and improve battery life.
- ldkronos, on 07/17/2008, -0/+1Not me. System stability is very rarely an issue. Usually when I need logs its to see why some application failed or did something strange. In those cases, virtually 100% of the time the system is still running fine.
- eggsovereasy, on 07/17/2008, -0/+1@thisguy47
Welcome to the Internet! - bnolsen, on 07/17/2008, -0/+1metalog can be configured to do a lot of buffering before writing out. But this ramlog is definitely a real option for someone running a solid state drive.
In my experience many crash problems, especially non hard drive related ones don't end up being logged. So it makes some sense on a desktop to never force synchronous logging. - Tenoq, on 07/17/2008, -1/+2Why would your laptop have a sudden loss of power?
- inactive, on 01/15/2009, -0/+1if you want laptop battery with discount price. go there:
http://www.babatek.com/original-hp-compaq-laptop-b ...
http://www.babatek.com/original-hp-laptop-battery- ... - ilgaz, on 07/17/2008, -0/+1Divert them to a cheap USB key instead? makes more sense.
- quiggibub, on 07/17/2008, -0/+1Can't that statement be considered treason among linus geeks?
- ldkronos, on 07/17/2008, -0/+1The article tells you how to commit the logs to disk on demand, so just cron that up to run every few hours. So this only ends up being a problem when something happens that I need to see the logs for AND I don't realize it for at least a few hours AND I have a system crash or power failure in that time. For myself, thats more than sufficient.
- brightshadow525, on 07/17/2008, -0/+1Any purpose for a desktop?
- MtheoryX, on 07/17/2008, -0/+1Car RamRod! Say Car RamRod!
- abhiroop, on 07/18/2008, -0/+1Or install a program in a few clicks...
- nova20, on 07/17/2008, -0/+1"The tradeoff is that if the laptop crashes instead of shutting down gracefully, you will lose the logs that were in RAM, but most of the time on a laptop the logs are not mission-critical."
uh... if my computer crashed I'd like to be able to look in my logs and know why it crashed. - Tenoq, on 07/17/2008, -0/+1@ LordFate - my laptops have never had the battery go dead when I didn't expect it....
It's a bit like your car running out of fuel. Sure it can happen, but you refill it before it does, don't you? :p - ldkronos, on 07/17/2008, -0/+1As I just mentioned in another post, system stability isn't an issue for me. Most of my systems have been rock solid from an OS level. Any time the OS actually does fail, it often doesn't log anything of any significance to the logs. Typically what fails for me are applications (which aren't running as root). They can crash horrifically but the system itself is still running fine.
- RyeBrye, on 07/18/2008, -0/+1Good point. I'd log them all to RAM and set up a cron job to run every 0.5 seconds - that way I get the best of both worlds! The sheer speed of logging crap to ram, plus the warm fuzzy of knowing I will have logs if I lose power.
- cquinnd, on 07/19/2008, -0/+1Except write speeds to a cheap USB key will be even worse than just writing them to the hard drive.
- unitedatheism, on 07/17/2008, -0/+1i bet you can do a crontab to restart ramlog each hour or so resulting on this, but the article forgo to mention that possibility...
- dbr_onix, on 07/17/2008, -0/+1I think the problem is if the machine suddenly dies, you have no logs explaining why it may have died..
- ldkronos, on 07/17/2008, -0/+1The whole system suddenly dies? Under linux, with the exception of hardware failures (for which logs weren't much help) I can't recall the last time that has happened. I have no doubt some systems are subject to instability, but plenty of systems are rock solid and this really wouldn't be an issue.
- mossblaser, on 07/17/2008, -0/+1Use a better delayed write system or a cheap memory stick...
- jmazzi, on 07/17/2008, -0/+1Although you will lose the logs when the system crashes, you won't be able to debug a problem when your log is going to /dev/null. At least with this you can watch for useful messages in the log and still get a performance boost.
-
Show 51 - 70 of 70 discussions



What is Digg?