Crucial C300 too slow for timeshift file?!? (1 Viewer)

MJGraf

Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,475
    1,385
    Country flag
    Hi there,

    I recently put together a new htpc, for which I used a Crucial Real SSD C 300 (128GB) as main drive. On that SSD is my operating system (Win 7), MediaPortal (single seat) and I also configured the TV-Server to put the timeshifting files on that drive. Furthermore there is also a 2 TB WD drive, which is only used as data drive (MP3s, DVDs, etc.). Both drives are connected to the ICH10R on my mainboard.

    The htpc is running the whole day (no standby, etc.). After a while, I realized that there is only one problem with watching tv on that rig: When I started live TV in the evening after the htpc was idling the whole day, the stream often didn't start on the first try. When I started TV a second time, it took again quite a while (10 / 15s or so) but then the TV started. After that, when swithing channels, everything was smooth as silk (channel change times below 1s). The problem only occured, when I started the TV after it was switched off for a while.

    I had a look into my log files and found this:

    2011-01-25 21:10:19.080379 [Channel state thread(24)]: ChannelStates.DoSetChannelStates took 316 msec
    2011-01-25 21:10:19.549406 [TS_File_Cleanup(25)]: card: delete timeshift files \live2-0.ts
    2011-01-25 21:10:22.668585 [TS_File_Cleanup(23)]: card: delete timeshift files \live3-0.ts
    2011-01-25 21:10:24.550692 [TS_File_Cleanup(25)]: card: delete timeshift files \live2-0.ts
    2011-01-25 21:10:29.550978 [TS_File_Cleanup(25)]: card: delete timeshift files \live2-0.ts

    This can't be normal. It can't take five seconds to delete a single file?!?

    A reason may be that I switched off write caching in the device manager for the SSD. That was necessary, because I noticed that after some hard power offs I always faced corrupted files (MP XML-files not readable any more, MySQL-Server data files could not be opened, etc.). I very often had to hard power off other PCs, but only in one single case I had corrupted files - with this SSD I had corrupted files after every single hard power off. Therefore I switched off the write cache to make the PC bullet proof. Another thought would be trim, which is switched on. But trim shoudn't block the whole PC?!? Furthermore it can't be the fact that we're talking about a SSD as such, because in my other HTPC I'm using an Intel X-25-M (G2), with wich I never had such problems (also MediaPortal, also timeshift files on the SSD).

    I'm still about to investigate this further, but it will take some time, since this is our new main tv set and I'm not "allowed" to disturb every couple of minutes when we're watching tv ;-) But I'll definitely report back as soon as I've found out the reason for this.

    Has anyone else experienced such problems with SSDs as timeshifting drives? Are SSDs the right way to go for timeshifting at all? The first thing I'll try is to use my WD harddisk as timeshift drive (although the reason for not doing this was that I wanted the HTPC to be completely silent while watching TV). A problem I might face there is that the harddrive will be sleeping after a day of idling and starting TV would probably again take some seconds until the drive has spun up. Is there as solution for this (except for disabling sleep state completely for the harddisk of course). Any thoughts are appreciated.

    Thanks and cheers,
    Michael
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Please post full logs or else we can't properly confirm that the SSD is the issue...

    A reason may be that I switched off write caching in the device manager for the SSD.
    I suspect this is the issue. My understanding is that turning of the write cache forces the write-back to the drive to occur "synchronously" (immediately) rather than delaying it until it is more convenient for the drive.

    That was necessary, because I noticed that after some hard power offs I always faced corrupted files (MP XML-files not readable any more, MySQL-Server data files could not be opened, etc.). I very often had to hard power off other PCs, but only in one single case I had corrupted files - with this SSD I had corrupted files after every single hard power off. Therefore I switched off the write cache to make the PC bullet proof.
    Seems very odd! I suspect shutdown was happening too fast. Power is lost before the drive has the chance to write its cache...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,475
    1,385
    Country flag
    Sorry, logs of last night attached (The error log was after such a hard power off, which apparently corrupted the MySQL database, but this is solved by deleting and rebuilding the database...)
    Thanks for your help,
    Michael
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Denmark Denmark
    How does the system behave if you use your 2 TB normal harddrive as buffer for timeshifting?

    I had a RAID 1 system with two disks, and forgot to turn on write cache when I stripped it down to use the drives independently, and this gave me really poor write performance. Turning on write cache cleared the issue. Your problem with the corrupted files is ofc. a real problem :(

    Have you searched the web to see if there have been issues with the firmware of your SSD?
     

    romuz

    Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Russian Federation Russian Federation
    TS_File_Cleanup process works with low priority inside MP. 5 sec is not time taken by your SSD to phisically delete files but period when MP have decided to delete not used buffers.
    According to your error log you have corrupted mysql db. I suspect this is your issue.
    You can drop it by starting setuptv with --delete-db or /delete-db key and recreate again.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,475
    1,385
    Country flag
    Thanks everybody!

    romuz: The mysql db was indeed corrupted (by a hard power off), but this was in the morning and I already deleted the database and recreated it in the morning. So in the evening, when I had the described problems, the db was already clean again.

    However, I must admit that my logs are not as clean as they should be. Sorry for that. I'll try to reproduce the problem during the next days with a clean log and report back.

    cheers,
    Michael
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,475
    1,385
    Country flag
    ok guys, the first update: moved the timshift files to the non-ssd drive last night. Everything else unchanged. Time from pressing the remote button until the (scrambled) channel was up and running: at least less than a second, I would even say less than half a second.

    That means it must have something to do with my ssd or my settings for the ssd. Although my problem is solved now, this is only a workaraound. I mean the crucial ssd is said to be one of the fastest ssds in the market. Something must be wrong there. I'll try to investigate this further and will report back.

    cheers,
    Michael
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    I guess maybe chipset/AHCI driver issues. Update your motherboard drivers...
     

    kszabo

    MP Donator
  • Premium Supporter
  • December 6, 2007
    796
    86
    Germany, Bayern
    Hungary Hungary
    Hey,

    I upgraded my system with a Crucial C300 64GB SSD, as system drive with Timeshift buffer on it (SATA as AHCI, clean new install of Win7 and MP, proper chipset drivers for my AMD780G chipset):
    no problem at all with Timeshift on SSD, even with HD Channels.

    I decided to use a 2 GB Ramdisk though for Timeshift just not to stress the SSD (maybe I am too cautious).
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom