Follow via Facebook Follow via Twitter Follow via YouTube Follow via RSS Steam Group

 Messages: 1419
 Topics in blog: 4





Nov 30, 2011, 10:32 PM by Ratio in Technology

You should probably read this a few times and make sure you're comfortable with the methodology before doing this. Creating symbolic links is gone over in more detail in the SSD entry.

I'm going to outline the plan first so that hopefully the steps to complete the plan make more sense when they come up.

In the current build, the cache files are stored in %HOMEPATH%\AppData\Local\SWTOR\betatest (This will change, of course, but the process will be the sae with a differently named folder. I will update this when that occurs.)

We want to take that folder (betatest) and symbolically link it to the root of a RAM Disk. That will make the entire RAM Disk behave like the folder betatest and any requests to that folder for reads or writes will be done to the RAM Disk, making the cache file read/writes stupidly fast.

Next we need to move two folders inside of betatest back to near their original location since they're filled with things that receive little benefit from a speedy cache and, over time, will fill up the RAM Disk and make it useless for its intended purpose.

The two folders we want to move back and symlink are "settings" and "logs". I'll be creating a new folder called backlinks in %HOMEPATH%\AppData\Local\SWTOR\ because the name has to be different since we can't symlink a circle and it would cause havoc if we could.

About RAM usage... I'll add this part later for those that are concerned about eating up their RAM with a RAM Disk.

On to the mechanics.

The cheapest (free) and easiest to use RAM Disk for 4GB and under is probably Dataram RAMDisk. Download the freeware version, install it, then run the setup. (If you want a bigger RAM Disk, pay the license fee.)

Run the configuration utility (in you start menu). For a 2GB RAM Disk...

If you want to save the RAM Disk state across computer resarts (RAM Disks are volatile) then...

Hit Start RAMDisk. You'll have an error come up about not being able to load the image. This is normal for the first time startup...

Once this message comes up at the bottom: "RAMDISK started successfully", then you're ready to move on.

Open Computer Management (type it in your start menu or right-click My Computer and hit Manage...) and select Disk Management. An automatic pop-up will appear:

Choose MBR and hit OK.

Once the volume is in your disk list, right click it and select New Simple Volume...

I use drive letter R: for RAM, but feel free to use whatever letter strikes your fancy.

Format it as NTFS, change the label if you feel like it, and enable compression. The drive is so fast that the compression overhead is unnoticeable.

This is where it gets hinky, so read it twice. :)

1. Open two explorer windows and move copy the contents of the betatest folder (%HOMEPATH%\AppData\Local\SWTOR\betatest) to your RAM Disk.
2. Then go back and delete your original betatest folder.
3. Add a symlink in %HOMEPATH%\AppData\Local\SWTOR\ that goes from betatest to your RAM Disk.
4. Create a new folder in %HOMEPATH%\AppData\Local\SWTOR\ called "backlinks".
5. Go to your RAM Disk and copy the folders "settings" and "logs" into the folder the new folder (%HOMEPATH%\AppData\Local\SWTOR\backlinks).
6. Go back to your RAM Disk and delete the folders "settings" and "logs" and create symlinks from your RAM Disk to %HOMEPATH%\AppData\Local\SWTOR\backlinks\settings and %HOMEPATH%\AppData\Local\SWTOR\backlinks\logs, naming the symlinks settings and logs, respectively.

Here's the commands I used. Yours should be relatively similar, though paths may be different:

If you do it right, your %HOMEPATH%\AppData\Local\SWTOR\ folder should look something like:

Your %HOMEPATH%\AppData\Local\SWTOR\backlinks folder should look something like:

And your RAM Disk should look something like:

Some notes.

Creating the RAM Disk this way may add 30 seconds or so to your boot and shutdown times if you don't have NTFS on the drive where you're saving the image, since the drive has to be saved and loaded on each shutdown and boot up. (If you have NTFS, the file is automatically compressed by Dataram RAMDisk. Obviously, you may also have this issue if you aren't using the same RAM Disk software.) This can be mitigated. What you need to do is this:

1. Delete everything from the RAM Disk except the symlinks to "settings" and "logs".
2. 3. Click "Save Disk Image Now" - this will save the disk image with only the symlinks in it which take up barely any room at all.
3. Go into the RAM Disk configuration utility and uncheck "Save Disk Image on Shutdown".
4. Move your image file (RAMDisk.img) into a sub-folder on the drive you have it stored in. For instance, if your img file is "D:\RAMDisk.img" move it to "D:\RAMDisk\RAMDisk.img".
5. Notice that current RAMDisk.img file is the full size of your RAM Disk, even though there's barely anything on your RAM Disk.
6. Enable compression on the folder that contains your image file. (In this example, right click on D:\RAMDisk, click Properties, hit Advanced, check Compress contents to save disk space, then OK, Apply, etc.)
7. If you look at the image file now, it will still look like it's taking up 2GB, but if you right-click it and check its size on disk, it should be something like 50MB. This will make the boot up hit nearly unnoticeable (about 1-2 seconds at most).

 [Comment on this topic

Oct 08, 2011, 12:32 AM by Ratio in Technology

Note: If you have a real firewall (linux based programmable hardware, not a consumer grade netgear router or a software firewall) you should use iptables to do this. (You can also do it in an ultra-lightweight virtual machine if you know what you're doing.) The following is for Windows users that want an easier less cantankerous solution.

This will reduce the latency for TCP/IP games (Aion, WoW, CO, etc.) by not using delayed acknowledgments (ACKs) as specified in RFC 1122. It is on by default because it optimizes the transfer of packets by preferring to send ACKs only when full-sized TCP data packets (or a bunch of small packets -- segments -- that add up to a complete packet) arrive, thereby reducing overall bandwidth. Since TCP/IP games generally use (much) less than complete packets to transmit data, Windows is imposing a 200ms delay waiting for a packet to complete (which it never will, because the game server is waiting for an ACK before sending the next packet) before sending an ACK.

On the other end of the pipe, the server is using the Nagle algorithm which means that it is buffering data until it receives an ACK or until it has a full data packet to send.

So what ends up happening is something like this:

 0ms Server sends segment, waits for an ACK.
 20ms Client receives segment, waits for more data before sending ACK.
 50ms Server buffers segment.
100ms Server buffers segment.
150ms Server buffers segment.
200ms Server buffers segment.
220ms Client sends ACK.
240ms Server receives ACK, sends buffered segments, waits for ACK.
250ms Server buffers segment.
260ms Client receives segment, waits for more data before sending ACK.
... etc.

It's actually more complicated than that because the server will occasionally generate full TCP data packets while waiting for an ACK and send those along, and when it does that, since the client receives two segments, it will immediately ACK, but then you go back to the beginning where the server sends a segment having received an ACK and then sits in a wait buffering state again.

This is exactly what services like Lowerping and Gamepath do for you remotely -- they ACK the server as soon as any segment comes in, telling it to send the next segment immediately. Your computer ACKs faster using one of these services because the packet stream never pauses, so your comp is getting full data packets faster.

Why is it like this? TCP/IP was never designed for real time applications or for small data segments. It has a 20 byte TCP header and a 20 byte IPv4 header meaning that if you want to send 1 byte of data, it costs you 41 bytes to do it in TCP. The imposed waits are so that the packets are as full as they can be when transmitted, thereby lowering the overhead of the headers and helping to prevent congestion.

Should you do this? Up to you. It will make large file transfers less efficient. (More upstream bandwidth on your end to download porn since you're ACK'ing every single packet.) Your machine will (technically) be out of compliance with current TCP/IP standards. You probably won't notice a thing outside of TCP/IP games in daily usage.

  • Capitalization matters.
  • You have to have the latest service packs installed.
  • This will have absolutely no effect on UDP based games. (Pretty much every other game in the world, including EQ2.)

More on:

Undoing it:
Follow the same steps, but change TcpAckFrequency to 2 and TCPNoDelay to 0.

Windows Vista/7

 1. Run "regedit" (Start -> Search -> regedit)
 2. Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces
 3. Browse the items under interfaces until you find one that has an IP Address entry matching the network interface you want to affect (typically LAN IP addresses start with 192.168 or 10.0); note that if your IP address is automatically assigned by a DHCP server you may need to look for a matching DhcpIPAddress instead of IPAddress
 4. Right-click on the interface and select New > DWORD (32-bit) Value, name it TcpAckFrequency
 5. Right-click the new TcpAckFrequency value and select Modify, enter 1 (Hexadecimal radio button should be selected)
 6. Right-click on the interface and select New > DWORD (32-bit) Value, name it TCPNoDelay
 7. Right-click the new TCPNoDelay value and select Modify, enter 1 (Hexadecimal radio button should be selected)
 8. Exit regedit and reboot.

Windows XP

 1. Run "regedit" (Start -> run... -> regedit)
 2. Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
 3. Browse the items under interfaces until you find one that has an IP Address entry matching the network interface you want to affect (typically LAN IP addresses start with 192.168 or 10.0); note that if your IP address is automatically assigned by a DHCP server you may need to look for a matching DhcpIPAddress instead of IPAddress
 4. Right-click on the interface and select New > DWORD Value, name it TcpAckFrequency
 5. Right-click the new TcpAckFrequency value and select Modify, enter 1 (Hexadecimal radio button should be selected)
 6. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters
 6a. If you don't have a registry entry for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\, navigate back to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
 7. Right-click on the right-hand pane and select New > DWORD Value, name it TCPNoDelay
 8. Right-click the new TCPNoDelay value and select Modify, enter 1 (Hexadecimal radio button should be selected)
 9. Exit regedit and reboot.

 [Comment on this topic

Oct 08, 2011, 12:28 AM by Ratio in Technology

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:

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.

 [Comment on this topic

Oct 08, 2011, 12:04 AM by Ratio in Technology

Obvious and less obvious Solid State Drive stuff.

  • 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 applications like to build very large cache files 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.

  • 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.

 [Comment on this topic

Pages: [1]

* Live Streams

Data retrieved in 0.12 seconds.

* Recent Posts

Site Stuff by Ratio
[Aug 09, 2018, 07:56 PM]

Canderous Ordo Trash Talk by Cates
[Apr 26, 2017, 04:49 PM]

New Voice Communicator...? by Cates
[Apr 26, 2017, 04:49 PM]

Star Citizen by Cates
[Nov 19, 2016, 05:21 AM]

Free Games by Crabbok
[Jul 29, 2016, 11:47 PM]

XCOM 2: LD50 at War! by Yuri
[Jul 14, 2016, 05:17 PM]

Overwatch by Crabbok
[Apr 30, 2016, 04:17 PM]

Disney buys Star Wars by Dargos
[Apr 14, 2016, 04:57 AM]

Free Division Clothing "Gear" Sets by Cates
[Mar 06, 2016, 08:23 PM]

Internet on the Island by Fixate
[Mar 03, 2016, 07:14 AM]

* Gallery


Views: 2443
By: Acorns