cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Clear Cache Windchill

MS_Santos
13-Aquamarine

Clear Cache Windchill

Good morning ,

would have any way to clear this cache of automated machines? any script that I can put in the GPO or in the machine itself even if I do this every week?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MS_Santos
13-Aquamarine
(To:Dobi)

Do you have a ready-made bat or script to do this because when it reaches a certain size, it starts to slow down, or if you can increase it, that would be cool too.

View solution in original post

11 REPLIES 11
avillanueva
22-Sapphire II
(To:MS_Santos)

This the workspace location where is downloads are and where it saves files the modified files. when you say automated machines, like a CAD worker? Yes, you can whack that and I typically whack the .wf folder since the CAD worker can rebuilt the server registry.  If this is a user's machine, no, do not delete that folder as it would lose their local work that is not checked in.

MS_Santos
13-Aquamarine
(To:avillanueva)

hello everything is fine

I believe I didn't explain it directly, I need some script or something that every week it clears after a while it gets very slow, today we do it manually

is this for end user machines? weekly clearing of the cache seems drastic. is the cache folder located on the local machine and not a network drive?

MS_Santos
13-Aquamarine
(To:ScottMorris)

Yes, it is on the end user's machine, it doesn't have to be a week of 20 days or even more, this is a secondary unit of the machine 😧

avillanueva
22-Sapphire II
(To:MS_Santos)

What is likely slowing things down is likely not the amount of data in that folder but rather the number of objects in the workspace. Deleting the local cache does not affect this since on recreation, those workspaces are still on the server with the same number of objects on them. Users should be trained to delete or clear workspaces periodically after a job is completed. This should have the same affect and the local cache will manage itself. You can also set an upper limit on the local cache through a preference.

MS_Santos
13-Aquamarine
(To:avillanueva)

Would you be able to increase this? but is there any way to clean this via some script?

Dobi
14-Alexandrite
(To:MS_Santos)

Like @avillanueva and @ScottMorris said, the size of the cache is not the likely cause of the slowness. It's common practice to wipe the cache folders on CAD workers but on user systems I only ever do it when the cache needs to be rebuilt (cache corruption, Creo to non-Creo cross contamination). You can create a start up script that starts with a clean cache every time or you can create a clean up .bat that runs on a schedule through the OS... it will delete data though. 

 

What sort of slowness are you seeing? 

One thing that worked for us to improve speed was adding anti-virus exclusions to particular cache folders (CS50545).

 

 

MS_Santos
13-Aquamarine
(To:Dobi)

Do you have a ready-made bat or script to do this because when it reaches a certain size, it starts to slow down, or if you can increase it, that would be cool too.

Dobi
14-Alexandrite
(To:MS_Santos)

I can put a script together to wipe the cache based on what we have running on the workers but I do want to caution that it's a heavy hand with a lot of cons and not too many pros. Your slowness will likely reappear because this won't address the root of it. 

My cache is regularly in the 8+GB range because of the types of models we have and everything runs fine even though I have 80+ workspaces. 

The anti-virus, RAM. CPU and graphics (both hardware and drivers) would all be things I'd try before going the route of wiping cache and rebuilding on a regular basis.  

 

 

 

MS_Santos
13-Aquamarine
(To:Dobi)

My hardware is a machine with 48GB memory, 1TB SSD and so how do I increase Cache? I can start doing this and then go on to cleaning later

Dobi
14-Alexandrite
(To:MS_Santos)

Your cache will get bigger or smaller depending on what you have in your workspaces. The only limit you'll run into is if you get close to your total available disk space. 

 

Dobi_0-1683299374014.png

 

Before doing a .wf folder wipe, you can try a simpler exercise of just deleting workspaces you no longer use and seeing if that makes a difference in performance. 

Which version of Windchill and Creo are you on? There are some registry settings for older versions that can help a good amount for performance and for the newer versions, again, the anti-virus exclusions (for us) resulted in a 50%+ improvement in "add to workspace" operations alone. 

 

When you say things get slow after a week, what gets slow? Adding, modeling, graphics?

 

If you're still determined to wipe the cache, this ought to work as long as you are comfortable deleting any new or non-uploaded data.

@echo off
echo Killing open sessions
rem You probably can get away with just killing xtop... that ought to kill the outstanding related services
tasklist|find /i "xtop.exe" >NUL
if errorlevel 0 (taskkill /f /t /im xtop.exe)
tasklist|find /i "genlwsc.exe" >NUL
if errorlevel 0 (taskkill /f /t /im genlwsc.exe)
tasklist|find /i "ptcwfsservice.exe" >NUL
if errorlevel 0 (taskkill /f /t /im ptcwfsservice.exe)
tasklist|find /i "creoagent.exe" >NUL
if errorlevel 0 (taskkill /f /t /im creoagent.exe)
echo deleting .wf folder
rmdir D:\Cache\rmendes\PTC\ProENGINEER\Wildfire\.wf /s /q
@echo on

Save this as a .bat somewhere and you can then set up a Task Scheduler through Windows to run at some frequency that makes sense. 

Dobi_1-1683301075382.png

 

After you do this, you'll have to re-add your Windchill servers and if you have a large amount of stuff in your server-side workspaces, it'll take a minute to rebuild and sync the first time. 

 

I do this nightly on my CAD workers and the code is from the startup.bat scripts. But there it doesn't matter.  

On user systems, I only do this when it's absolutely necessary (i.e. cache corruption, wld syncdown lock error, etc.) or if there are shared systems but each user logs in with his/her own credentials for chunks of the day. Your slowness issue is somewhere else... not here, I don't think. 

Top Tags