INTERACT FORUM

More => Old Versions => Media Center 15 (Development Ended) => Topic started by: Matt on November 09, 2010, 07:49:43 pm

Title: Slow to write to log [HELP NEEDED]
Post by: Matt on November 09, 2010, 07:49:43 pm
I've been tracking a strange problem on my home machine.  It turns out that writing to the log file is really slow once in a while.  The log is on an OCZ Vertex SSD with the latest firmware that otherwise seems to work great.

Here's log samples from build 150:
Code: [Select]
3991254: 4152: TV: CTVRecordingManager::Process: Start
Slow to write to log (1669 ms)
3992923: 4152: TV: CTVManager::CreateTVControlForAllDevices: Start
3992923: 4152: TV: CTVManager::CreateTVControlForAllDevices: Finish (0 ms)
3992923: 4152: TV: CTVRecordingManager::Process: Finish (1669 ms)

5765142: 4152: Database: MCDB::Save: Start
Slow to write to log (1778 ms)
5766920: 4152: Database: MCDB::Save: Saving (bCleanDB: 0, bForce: 0)
5766920: 4152: Database: MCDB::Save: Finish (1778 ms)

4129456: 4152: Playback: CBitrateMonitor::UpdateBitrate: Start
Slow to write to log (2761 ms)
4132217: 4152: Playback: CBitrateMonitor::UpdateBitrate: Accum audio bytes 185280, video bytes 5474364, time period 3803.459331 ms
4132217: 4152: Playback: CBitrateMonitor::UpdateBitrate: Bitrate for current period: 11904000, audio: 389708, video 11514494
4132217: 4152: Playback: CBitrateMonitor::UpdateBitrate: Finish (2761 ms)

As you can see, the call to write to the log (about a 100 byte write) can take seconds!  Anything that logs periodically can trigger the slowness.  

The logging is fast 99+% of the time, and there doesn't seem to be any correlation to other things happening in Media Center when it does slow down for a write.

I'm wondering if others using build 150 (or newer) with logging enabled could search their logs for "Slow to write to log" and see if they ever get this.

I'm guessing it's simply something weird (or failing) about my particular hardware, but if others see the same, it could mean there's something larger wrong.

Thanks.
Title: Re: Slow to write to log [HELP NEEDED]
Post by: DarkPenguin on November 09, 2010, 08:13:29 pm
There is an issue with OCZ drives where the trim command takes an extended period of time to complete.  Seems like this would show itself most often with something like a log file.
Title: Re: Slow to write to log [HELP NEEDED]
Post by: Matt on November 09, 2010, 09:04:52 pm
There is an issue with OCZ drives where the trim command takes an extended period of time to complete.  Seems like this would show itself most often with something like a log file.


That makes sense.

Is there any solution?  Backwards flash to old firmware that doesn't support trim?  Buy an Intel?

I ran the manual ocz_gc.exe / wiper.exe tonight before trying the build.  As you can see, it didn't help.
Title: Re: Slow to write to log [HELP NEEDED]
Post by: glynor on November 09, 2010, 09:19:28 pm
I have a couple machines I can check for it on.  No SSDs here yet though, so that could help narrow (or widen) the field a bit.
Title: Re: Slow to write to log [HELP NEEDED]
Post by: marko on November 12, 2010, 02:50:41 am
I have MC running on an 80 Gb Intel SSD.

My log file (every logging option ticked) is now just a shade under 10 Mb and contains around 117,000 lines of text. The word "slow" is not present in this log file.
I'll keep it going 'til the end of the windows session, but so far, no slow...

-marko.
Title: Re: Slow to write to log [HELP NEEDED]
Post by: glynor on November 12, 2010, 09:33:41 am
I've been running build 150 on my server machine since you released it on the beta board.  It has mostly been in Library Server (task tray) mode, but I did use the clients elsewhere.  The log has no instances of "Slow to write to log" yet...

I'll check again this weekend to be sure, but it looks like it might very well be a hardware thing at your end.  It could be the block rewrite penalty and the slow garbage collection on the OCZ interfering somehow... Not sure.
Title: Re: Slow to write to log [HELP NEEDED]
Post by: Matt on November 15, 2010, 10:24:53 am
There was a 30 second "slow to write" in my log this weekend.

The drive is only half full and the write from the log is like 30 bytes.

So I'm pulling the plug on the drive.

It's been good to me for a couple years, and it looks like faster drives are about half the price now.

Hopefully my wife doesn't see this thread, since I'm planning to put the old drive in her laptop ;)
Title: Re: Slow to write to log [HELP NEEDED]
Post by: marko on November 15, 2010, 01:05:55 pm
Class :D :D