Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: SSD Caching  (Read 6263 times)

0 Members and 1 Guest are viewing this topic.

erobby

    Topic Starter


    Beginner

    • Experience: Experienced
    • OS: Linux variant
    SSD Caching
    « on: September 26, 2013, 03:23:39 PM »
    So recently I've been playing with the Lenovo T431s, but this is not about the laptop it's about the 24 GB SSD drive they install for caching, I think it's a cool feature to have.

    So the default configuration is a 16 GB caching drive and a 8 GB hibernation partition which I didn't figure was needed.  So since I'm looking at distributing this model to our users I had to learn the configuration of the software.  For starters it uses the ExpressCache application which really doesn't have many configurations options the only one I found hand was the -preload option. 

    So the basics configuration is as follows:

    This is a high level overview that will be detailed later

    Uninstall Expresscache - Reboot Required
    Run DiskPart to configure the SSD card
    Reinstall Expresscache - Reboot required
    Load desired files and folders



    Since this is a mass deployment I set up the machine with all the applications and configuration settings and uninstalled Expresscache before capturing the image so I don't have to worry about the first step of uninstalling the application.

    Image is put on the machine with a batch file and 2 Diskpart scripts

    Diskpart Script 1

    =================
    List Disk
    =================

    This is designed to identify the correct disk to work with

    Diskpart Script 2

    =================

    Select Disk %dsknum%
    Clean
    Convert MBR
    Create Partition Primary
    Set ID=73 Override
    Exit

    =================

    Once the correct disk is identified all partitions are removed, it's converted to a Master Boot Record and the ID is set to 73

    Batch Script

    =================

    @echo off
    cls
    setlocal EnableDelayedExpansion
    setlocal EnableExtensions


    :Start
    If exist c:\windows\system32\phtcfg\SSDCFG.flg goto Cleanup
    If exist c:\windows\system32\phtcfg\partI.flg goto Exprinst

    :ConfigDSK
    for /f "tokens=1,2,4,5" %%a in ('diskpart /s c:\windows\system32\phtcfg\diskcfg.edr ^| find /i "online"') do if %%c==22 (set dsknum=%%b & goto config)
    goto End

    :Config
    diskpart /s c:\windows\system32\phtcfg\SSDcfg.edr
    type nul >  c:\windows\system32\phtcfg\partI.flg
    start /w C:\DRIVERS\expresscache_setup_64
    goto end

    :Exprinst
    cd c:\windows\system32
    for /r %%l in (*.dll) do eccmd -preload "%%l"
    cd "c:\Program Files (x86)\Microsoft Office"
    for /r %%m in (.) do eccmd -preload "%%m"

    :cleanup
    del c:\windows\system32\phtcfg\partI.flg
    reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\SSD Config" /f
    type nul >  c:\windows\system32\phtcfg\SSDCFG.flg

    :end

    =================

    A register entry is added to the Run key for the default user, so any user creating a profile gets the value and it run on boot.

    The Start section determines the state. 

    If there are no .flg files nothing has been run
    If the partI.flg is present then only the first part of the script has run
    if the SSDcfg.flg is present then the process has completed


    The ConfigDSK section gets the disk information from Diskpart

    for /f "tokens=1,2,4,5" %%a in ('diskpart /s c:\windows\system32\phtcfg\diskcfg.edr ^| find /i "online"') do if %%c==22 (set dsknum=%%b & goto config)

    It opens Diskpart and runs the follow command "List Disk" and grabs the following variables (The word Disk, The Disk Number, The Disk Size and the Disk size units) for each disk ie Disk 1 495 GB.  Since we know it's a 24 GB SSD we check the Disk Size column for a matching number.  It then sets the disk number and goes to the configuration portion for the SSD card


    The Config Section
    Uses the second Diskpart to configure the SSD Card
    Creates a flag for for the completion of the first part  and installs Expresscache - This as stated above forces a reboot

    After the reboot since it is still in the run key of the registry it starts again but it finds the flag file indicating that the first part was complete and goes to the second phase

    The Exprinst Section
    Loads all the DLL in the Windows\System32 Directory and the entire Microsoft Office Directory on the Cache drive and does a Clean up

    The Cleanup Section
    Removes the Flag file for Phase 1, Removes the registry entry and creates a flag so to show that it has completed so when a new profile is created after checking the completed state in the Start section it goes to the Clean Up section to prevent it from running

    Really fast boot times Windows and Office is pretty quick, but it does depend on the data you are opening.  Overall a really fun time


    Calum

    • Moderator


    • Egghead

      Thanked: 238
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Other
    Re: SSD Caching
    « Reply #1 on: September 27, 2013, 02:36:41 AM »
    Thanks for the information, sure it will be useful to those interested in SSD caching and particularly the laptops you've been using it on.
    Personally I've never seen the point in SSD caching generally, I would always rather just go with an SSD rather than a small SSD to cache some reads and writes.  It's not really a halfway house between SSD and HDD performance as is usually advertised, IME it's usually much less than that.  Of course, if your read/write operations are quite limited and you can always hit the cache, then you'll get much more than that, almost to the level of a proper SSD perhaps.  But, if they're so limited...why not just use an SSD on its own, as the HDD would be redundant in that case?
    Slightly off topic I know, I've just never really seen the point.  It seems like an unnecessary complication.

    Kurtiskain



      Mentor

      Thanked: 58
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: SSD Caching
    « Reply #2 on: September 29, 2013, 02:10:13 PM »
    Thanks for the information, sure it will be useful to those interested in SSD caching and particularly the laptops you've been using it on.
    Personally I've never seen the point in SSD caching generally, I would always rather just go with an SSD rather than a small SSD to cache some reads and writes.  It's not really a halfway house between SSD and HDD performance as is usually advertised, IME it's usually much less than that.  Of course, if your read/write operations are quite limited and you can always hit the cache, then you'll get much more than that, almost to the level of a proper SSD perhaps.  But, if they're so limited...why not just use an SSD on its own, as the HDD would be redundant in that case?
    Slightly off topic I know, I've just never really seen the point.  It seems like an unnecessary complication.

    I also believe in this, however in your case it would be better to install your OS and primary work/client applications to the SSD. After installing to the SSD configure folder redirection for the my documents, pictures, etc and default paths to the HDD in the laptop. This allows users to install any additional programs they need while keeping all of the OS and essential work applications on the SSD for speed.

    This also allows for much more re-image flexibility. once your image is set up with the folder redirection and default installation paths you can re-image the machine and add any certificates (If they have any), ect again and all their data will be untouched and instantly available. After swapping to this you are cutting down on your overhead and giving you more time to drink coffee.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: SSD Caching
    « Reply #3 on: September 29, 2013, 07:13:38 PM »
    Cracks me up that this even gets any legwork...
    I thought the whole attraction for SSD HDD's was for the additional speed...yet people need to still tweak them for extra performance...
    " Anyone who goes to a psychiatrist should have his head examined. "

    Calum

    • Moderator


    • Egghead

      Thanked: 238
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Other
    Re: SSD Caching
    « Reply #4 on: September 30, 2013, 02:39:32 AM »
    I also believe in this, however in your case it would be better to install your OS and primary work/client applications to the SSD. After installing to the SSD configure folder redirection for the my documents, pictures, etc and default paths to the HDD in the laptop. This allows users to install any additional programs they need while keeping all of the OS and essential work applications on the SSD for speed.

    This also allows for much more re-image flexibility. once your image is set up with the folder redirection and default installation paths you can re-image the machine and add any certificates (If they have any), ect again and all their data will be untouched and instantly available. After swapping to this you are cutting down on your overhead and giving you more time to drink coffee.

    I just use an SSD...no need for folder redirection and all the rest of it :)
    However, what you suggest is certainly valid and builds on what I said above, it's definitely better than using a small SSD for caching if not everything will fit on it.  Saying that, I've comfortably run on a 32GB SSD on a laptop that was meant to be temporary, for nearly a year.

    Cracks me up that this even gets any legwork...
    I thought the whole attraction for SSD HDD's was for the additional speed...yet people need to still tweak them for extra performance...

    Do they?  I certainly don't...I install the OS, install drivers, run the WEI so Windows doesn't automatically defrag the SSD and sets up a couple other things, disable hibernation which I would do anyway as I don't use it and it just takes up 24GB (or however much RAM you have) and that's it.  No need for any tweaking or messing around, nothing over & above what I would do when setting up a machine with a HDD.