Crucial C300 too slow for timeshift file?!?

Discussion in 'General Support' started by MJGraf, January 25, 2011.

  1. MJGraf
    • Premium Supporter

    MJGraf Retired Team Member

    Joined:
    January 13, 2006
    Messages:
    2,475
    Likes Received:
    796
    Ratings:
    +1,372 / 1
    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
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Please post full logs or else we can't properly confirm that the SSD is the issue...

    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.

    Seems very odd! I suspect shutdown was happening too fast. Power is lost before the drive has the chance to write its cache...
     
  4. MJGraf
    • Premium Supporter

    MJGraf Retired Team Member

    Joined:
    January 13, 2006
    Messages:
    2,475
    Likes Received:
    796
    Ratings:
    +1,372 / 1
    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
     
  5. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    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?
     
  6. romuz
    • Premium Supporter

    romuz Retired Team Member

    Joined:
    July 26, 2008
    Messages:
    1,045
    Likes Received:
    125
    Location:
    Moskau
    Ratings:
    +126 / 0
    Home Country:
    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.
     
  7. MJGraf
    • Premium Supporter

    MJGraf Retired Team Member

    Joined:
    January 13, 2006
    Messages:
    2,475
    Likes Received:
    796
    Ratings:
    +1,372 / 1
    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
     
  8. MJGraf
    • Premium Supporter

    MJGraf Retired Team Member

    Joined:
    January 13, 2006
    Messages:
    2,475
    Likes Received:
    796
    Ratings:
    +1,372 / 1
    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
     
  9. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    I guess maybe chipset/AHCI driver issues. Update your motherboard drivers...
     
  10. kszabo
    • Premium Supporter

    kszabo MP Donator

    Joined:
    December 6, 2007
    Messages:
    796
    Likes Received:
    76
    Location:
    Germany, Bayern
    Ratings:
    +87 / 1
    Home Country:
    Hungary Hungary
    Show System Specs
    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).
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!