• Jan 24, 2018, 12:21 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: SSDs  (Read 2024 times)

Baya

  • Administrator
  • Karma: +5/-3
  • Posts: 316
SSDs
« on: Sep 27, 2011, 08:33 PM »

Obvious and less obvious Solid State Drive stuff.

General
  • Defragmenting an SSD is bad. Don't do it. Ever. Unless you have something like Diskeeper that replaces Windows defrag and makes allowances for SSDs.
  • Writing repeatedly to an SSD isn't a good idea (SSDs have a limited number of writes), so it would be a good thing for you to move things like caches and log files. If you're using an SSD as a system drive, this includes your user directory as that's where the porn cache... err... internet browser cache goes. Note that certain games like <censored> like to build a three gigabyte(!) cache file in your user directory every time they're launched. Moving your user directory (and anyone else's that uses the computer) to a regular spindle drive is a good idea.
  • Make sure that your page file is not on your SSD:
  • Start Orb -> Right-click Computer -> Select Properties
  • Click Advanced System Settings (on the left bar)
  • Click Settings... button under Performance
  • Click the Advanced tab and then the Change... button
  • Any SSDs in your system should have a Paging File Size of None. (Unless you only have SSDs, of course.)
  • If they do have a page file, select the drive and then check No paging file and hit the Set button.
  • Make sure that you have a page file on at least one of your spindle drives. System managed size is fine--with Windows 7, there is no longer an advantage to manually setting it. You can go ahead and create a page file on each spindle drive as Windows is clever enough to automatically use the fastest drive currently available for paging operations.



Moving your user directory involves the creation of symbolic links (regular shortcuts will not work) and activating the administrator account (so you can move your account folder without your comp bitching).

Creating symbolic links (symlinks) part 1
Symlinks in Windows are created using the mklink command in the command console. The first thing you're going to need to do is create a symlink to the Administrator account so that when you turn it on, it won't bother writing to your SSD at all.

For the purposes of the following, I'm asssuming that your system drive is C: and that your spindle drive is D: -- change these as appropriate.
  • Open the Start Orb and type: cmd followed by ctrl+shift+enter -- this will open an elevated command prompt.
  • Navigate to your Users directory--by default this is C:\Users and also by default, the command window starts in your account's User directory so typing cd .. will usually get you to where you want to be. If you don't know where your Users directory is and the command window starts somewhere random, then hit the Start Orb and type: shell:UsersFilesFolder which will open your User directory in a new window and you should be able to figure it out from there.
  • Once you're in your Users directory type: mklink /D Administrator D:\Users\Administrator This creates a symbolic directory link to a mirrored folder on your D: drive.
  • (For more information on any command you can type the command by itself with /? to get quick help. For instance: mklink /? will bring up the mklink help.)
  • Type: mkdir D:\Users\Administrator This creates the directory that you just symlinked to. (If the directory already exists, this command will generate an error that you can ignore.)

Activating the Administrator account
  • In the command prompt type: net user administrator /active:yes
  • (There are several ways to activate the Administrator account, but since you're already in an elevated command prompt, this is probably the fastest.)
  • At this point, you need to log off your account and log in the Administrator account. (Start Orb -> Log off, Select Administrator)

Moving directories
  • You can move as many of the user directories as you want to, including Default and Public. You want to move these directories to preserve their contents, so open two explorer windows and drag any user directories you want moved from C:\Users to D:\Users
  • Windows may complain about not being able to move certain items. The number one cause of this is Windows Media Player Network Sharing Service and in order to move the directories, you're going to have to kill the process.
  • Open Task Manager (Start Orb -> type: Task Manager and then hit Enter)
  • Select the Processes tab at the top.
  • You're looking for wmpnetwk.exe -- when you find it, click on it and click End Process then confirm you want to kill it.
  • At this point you should now be able to move the directories.
  • (Other processes and programs can also interfere, but those are dependent on your specific software configuration and you're going to need to hunt them down.)
If you try to move a user named Updatus, you still won't be able to. This belongs to nVidia's update checker and doesn't need to be moved, but if you really want to...
  • Start Orb -> Right-click Computer -> Choose Manage
  • Select Services and Applications -> Services
  • Scroll down until you find NVIDIA Update Service Daemon -- Right-click it and select Stop
  • Now you can move the folder and create the symlink.
  • After the folder is moved and the symlink is created go back and Right-click NVIDIA Update Service Daemon and select Start. Do not do this before you delete and symlink the directory or it will just stop you from deleting it when you want to or if you already deleted it but didn't symlink it, it will recreate the directory and you get to start again.
After successfully moving all the folders you want to move, you need to delete the folders that you've moved from your C: drive to make room for the symlinks.

Creating symlinks part 2
  • Open an elevated command prompt if you don't already have one open. (Start Orb -> 'cmd' then shift+ctrl+enter)
  • Navigate to C:\Users
  • For each folder you've moved to your D:\Users directory, you're going to need to create a symlink. To do that type: mklink /D <username> D:\Users\<username>
  • Example: If you moved the directory John, you'll need to type: mklink /D John D:\Users\John
  • If your directory name you're symlink'ing contains spaces, you'll need to surround the paths in quotes.
  • Example: If you moved the directory John Smith, you'll need to type: mklink /D "John Smith" "D:\Users\John Smith"
  • Do this for all directories that you've moved.

Cleanup
  • Log off the Administrator account and log back into your normal account.
  • Open an elevated command prompt.
  • Type: net user administrator /active:no to get rid of the Administrator account choice at login.

Other uses for symlinks
  • If you have a program you want on the SSD, you can move the directory from your spindle drive to your SSD and then add a symlink from your spindle drive that points at your SSD. You can of course only move bits and pieces that are slowing you down to save space on your SSD as well. For instance, with most games you can move just the assets or paks or <insert big ass texture and mesh folder here> to the SSD and then create a symlink pointing from the original to the SSD.
  • Conversely, if you have a program installed on your SSD and you want to move directories or files off, you can just reverse the process. (In EverQuest 2, for example, moving your log file directory off of your SSD is a really good idea.)
  • If you're moving a file instead of a directory, don't forget to omit the /D switch. For example, if you move Photoshop.exe from D:\Program Files\Adobe\Photoshop\ to C:\Adobe\Photoshop\, then you'd want to use mklink "D:\Program Files\Adobe\Photoshop\Photoshop.exe" C:\Adobe\Photoshop\Photoshop.exe (Note that you don't need to preserve directory structure--though it tends to keep things simple and organized--and that the first path needs quotes because of the space in 'Program Files'.)
  • You can of course move entire program directories, but for certain things (like Steam) that's probably a huge waste of space on your SSD. So try to just move what you need to.
« Last Edit: Sep 29, 2011, 08:19 PM by Baya »
Logged
A good plan violently executed now is better than a perfect plan executed next week.

It doesn't matter how many dragons you kill. All that matters is who takes home the princess.

Baya

  • Administrator
  • Karma: +5/-3
  • Posts: 316
Re: SSDs
« Reply #1 on: Sep 27, 2011, 08:37 PM »

Processes and Files

You need Process Explorer. It's a free program and available as part of the SysInternals Suite or as a standalone. It's available here at the time of this writing: http://technet.microsoft.com/en-us/sysinternals/bb896653

Finding the process that's preventing you from moving a file that you want to.
  • When you try to move a folder and it fails, don't ignore the error window! It will tell you exactly what file can't be moved.
  • Open Process Explorer.
  • Hit Ctrl+F and type in the name of the file you're searching for. This will probably return multiple results. Select the on that matches the directory path that you're trying to move.
  • Once you have the appropriate file selected, the process that has that file open will be hi-lighted grey in the upper pane. If System is hi-lighted, you're probably going to have to dig on the internet to find out what service is using the file.
  • If you don't know what the process is, google it. If it's a non-vital process, you can kill it (right-click -> Kill process). Repeat for all files that are giving you trouble until you can move the directory without error.
  • This also helps for deleting files that Windows won't let you.

Finding out what files a program is using.
  • Open Process Explorer
  • If the lower pane isn't open, hit Ctrl+H to show process handles.
  • Click on the program or process that you want to know about and a complete list of everything that it's touching and messing with will appear in the bottom pane.
  • At this point, you probably want to sort the handle list by name, so that actual files are grouped together. Files start with a drive letter and have the full path listed (like C:\ProgramData\Microsoft\Search\Data\Applications\Windows\MSS.log)
  • You can then go examine the file to determine if you want to symlink it somewhere else. Generally speaking, it's pointless to move Microsoft log files as they're mostly logging errors. What you want to watch for are games (and memory intensive applications like Maya, Photoshop, or Premiere) creating large cache files on your SSD. These are the things you want to symlink to somewhere else. In the case of these types of cache files, they are created on application launch and destroyed on application termination so you need to symlink the directory that contains the file and not the file itself as the symlink may be destroyed when the program closes. As a note, most well written programs that have their own cache file have a way inside of the program's preferences to specify where the cache should be created, so symlink'ing is not necessary in those cases. Other programs (especially games) just toss caches around willy nilly, though most modern games are using your user directory for that information like they're supposed to.
« Last Edit: Sep 27, 2011, 09:06 PM by Baya »
Logged
A good plan violently executed now is better than a perfect plan executed next week.

It doesn't matter how many dragons you kill. All that matters is who takes home the princess.
 


solitude-cats
solitude-cats
solitude-cats
solitude-cats