• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

F@H Start / Stop program

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Ven0m

Member
Joined
Sep 7, 2003
Location
Warsaw, Poland
Hey!
I've just finished "FAH Manager" - it's a program that starts and stops FAH Services depending on current processes' demand for CPU power.

How does it work:
Once a while it checks current processes CPU usage, if there's one that has more CPU usage than set threshold for some time, it stops FAH services. When CPU usage of most demanding application is below set limit, it starts FAH services - pretty simple. Additionally, you can set start / stop thresholds in ranges of 0 - 1000 (1/1000s of CPU power) and define how often to check CPU usage and how long low / high CPUusage has to last to do something. You can also define more than 1 Service to start / stop.

Features:
- starts / stops FAH services
- configurable
- monitors FAH CPU usage
- monitors CPU usage of the most demanding non-FAH process
- monitors avarage FAH CPU usage from last reboot
- tray icon with information about current FAH CPU usage
- when minimized, not displayed in taskbar
- logs when services are started / stopped and what was the reason of stopping
- small size - 60kB
- configuration in text file - possible manual editing (advanced users only)

First run:
- unpack
- start
- right-click on system tray icon, choose "Setup"
- adjust timers and FAH services names (each service name in separate line)
- default values should work pretty well, but you need to adjust FAH service name - default is "FAH"

Regular run:
- when started, program starts monitoring according to last set settings
- click minimize icon to make it minimize to tray
- double-click tray icon to reopen program, or righ-click tray icon and choose desired option

Requirements:
- a computer running Microsoft Windows
- .Net Framework

Final notes:
Program is written in C# for .Net Framework, so it will work only on Windows machines. Perhaps someone will make something similiar for Linux. As it's powered by .Net, it utilizes garbage collector. This means that you may expect strange memory usage displayed in some monitoring programs, but it should decrease when needed and should not affect performance.
Program has been tested on AMD Barton powered machine with the latest .Net Framework with latest patches avaible on release day. Program should not perform any internet connections. I couldn't test it on P4 HT and multi-CPu machines, but I think it should work. I take no responsibility for bad usage, versions downloaded from third-party sites and such stuff.
Before running program - read this post carefully. I give no support for people who haven't read instructions. I've used official OCForums icon as this program icon. If that's bad - let me know, I'll change it.
If you had any suggestions / comments - let me know.

So - FOLD and don't tell that FAH slows down your games anymore :D
 

Attachments

  • FAH Manager.zip
    13.4 KB · Views: 357
I.M.O.G. said:
Can it automaticaly shut down programs which are taking CPU time away from F@H? :eh?: :D

Not yet, but I might add this feature :D

Just now program is very simple and uses windows service controller executable to manipulate FAH services. So it's similiar to running batches when needed, but I've found some Services stuff, so perhaps there will be no configuration for services and program will directly connect to Windows Service Controller. Another release should be pretty soon, but I wanted to give initial release without unneeded delays.

And I don't exactly know how Windows report HT / multiple CPus computing time - so perhaps you may see Fodling power of over 100%. Anyway, how it is reported and should be reported is a myster for me till someone tests it.
 
Thats pretty cool. I created two .bat files & made shortcuts to my start menu for starting/stopping. This is for LAZY people. :p Nice work though.
 
Ven0m said:
And I don't exactly know how Windows report HT / multiple CPus computing time - so perhaps you may see Fodling power of over 100%. Anyway, how it is reported and should be reported is a myster for me till someone tests it.

ok, im testing it on my dually xeon pc with HT at work, it does show up to 400% usage with four total processors, logical and real. I also have tested it on another HT enabled machine and it only shows up to 100%, although this machine is set up to only show cpu usage on one plot. Just some info for ya, dunno if it will help at all.
 
Helsyeah said:
ok, im testing it on my dually xeon pc with HT at work, it does show up to 400% usage with four total processors, logical and real. I also have tested it on another HT enabled machine and it only shows up to 100%, although this machine is set up to only show cpu usage on one plot. Just some info for ya, dunno if it will help at all.

Sure it helps and helps a lot - thanks :D
 
threeme2189 said:
cool proggy good job!
i myself use the full f@h version with the red gear in the systray so i dont need this...
but if i ever will il know where to look!

The graphical client (full version?) is slower than the command line client (service install).
 
Cool. Nice to see people taking the time to do these things.

However, I was under the impression FAH already did this. Doesn't it only use spare CPU cycles, and hands them over to any other app that wants them firsts?

You probably know more about FAH than I do, so maybe you can confirm this.

thanks.
 
Stoanhart said:
Cool. Nice to see people taking the time to do these things.

However, I was under the impression FAH already did this. Doesn't it only use spare CPU cycles, and hands them over to any other app that wants them firsts?

You probably know more about FAH than I do, so maybe you can confirm this.

thanks.
Yeah, it uses only idle cycles - so it shouldn't affect performance. My benchies results, including 3DMark were the same with and without FAH, so it runs all the time for me. However, if someone has problems with RAM, it may be a problem. FAH is usually swapped nicely when you need more RAM, but it doesn't work perfectly. My bro who has only 256megs of RAM has reported improved performance with RAM-demanging apps - it's possible to play games, when having big units enabled then. However this program simply performs shutdown / restores FAH depending on CPU power consumption, to free RAM when needed. It's not too nice workaround, but it works. If you wanted to take a lok inside, any good .Net deassembler will convert it back to C# code. Perhaps I've still got sources somewhere...

Personally I don't use this program by myself, as I haven't got problems with lack of RAM (512 megs here) - people might benefit from using this program when they really see that FAH (running big units) eats RAM they need. In other case I wouldn't expect any performance improvement.

I've just made this program as a few people asked me for folding big units on older computers with less RAM.

Anyway making some simple monitoring program should be pretty easy. I know some PHP now and I think that some simple monitor linked with database might work. Computers would upload current data to some server and it would gather stats. We have some nice stats servers, like extremeoverclocking for example, but this might add data on currently folded units, like waiting points and estimated time for completing each unit. And maybe some XML feeds, image generators and such stuff. Perhaps there are programs that already do it.
 
I'm goning to call this thread back to life. I was wondering if there is anyway to make this program a service or atleast start automaticly. This woud be a big help, I could thne install it along with FAH on my siblings/parents/families computer and not have to worry about the possiblity that FAH might slow them down from time to time.
 
Disco_Stu said:
The graphical client (full version?) is slower than the command line client (service install).

I haven't noticed any difference from running either version. Same time/frame using either.

ven0m thanks for the program it's real handy.
 
Shelnutt2 - I haven't tried that but I think that making it start automaticly or isntall as service should be pretty easy.

Nexus Realized - I'm glad that it can be useful, but it was rather to show the possibility, rather than to make ultimate tool.

dicecca112 - well it's pretty normal issue :D
Method I used in this program is that it counts CPU time for all processes it can find, adds this time and compares to time elapsed. This way if machine can work with >100% efficiency, it may show >100% CPU usage. Impossible? Not really. It happens on multi-CPU/core rigs, where you can actually have 2 seconds of CPU time in each real second. There was 400% CPU usage report on 4-CPU computer. At time this app was made, dual cores were unheard of and multi-CPu rigs very rare, so it wasn't a problem. CPU usage handling will be modified, I think.

As response was pretty limited, I haven't worked on this program since its release, but after your posts I may revise it.

I might try to scale it on CPU usage to some other conditions, like CPU usage on most intensively used core, or looking at RAM usage or something else. In fact it was one of the first .Net programs I made. I haven't update it as there were no requests. Program doesn't work with latest FAH cores - only 65 and 78, so please don't use it with 82 till I update it or just keep in mind that it doesn't recognize core 82 as FAH. I'm really glad to see your posts, as it shows that you care and it's really motivating.

Service management isn't too clean with version you can download. I've learnt a few service managing methods that might be more proper and they could be used to install it as service, when I learn how to make services :)
Service version wouldn't have that whole gui stuff, but would be less demanding for RAM. If you open process manager and find that it uses lots of RAM, it's not that bad due to auto memory management in .Net framework - when mem will be needed for vital apps, this program won't use that much, so there's nothing to worry about.

I've got 512 megs and was thinking that memory problems related with FAH don't concern me. This program was rather made for my brother who had 256 megs. Now I can see that problem really exists not only for very old machines. I'm running bigpackets, and when I launch some games or RAM-hungry programs, even when FAH utilizes 0% of CPU, RAM isn't swapped and makes apps run slowly. So I'll try to make this program useful for possibly large number of Windows folders, so they could run bigpackets most of time even on rigs equiped with smaller amounts of RAM. My knowledge about Linux and problems that may occur on this system with FAH is very limited, so program would be Windows-only, at least till I learn more Linux stuff, but rather don't expect it to happen soon.

I don't know how stopping FAH service affect stored data - there would be potential risk of loosing calcs since latest breakpoint. So if someone knows more about FAH, please share your knowledge as it would be pretty useful. So for example if whole data is stored on process close, I might make more sensitive triggers for starting/stopping FAH, and if data maybe lost, triggers would be more "clumsy" to avoid process close on short high CPU usage.

As it's more about freeing RAM, I might also try to make it respond to RAM outages rather than CPU usage. When I made this program, polling processes for CPU time was the most reliable method I known, and I think I know much more now.

Visual Studio 2005 is going to be out on 7th November, so I should be able to get copy from my uni pretty soon. Perhaps .Net 2.0 will allow something more that would be useful for this application.

So if you think you have something interesting to say in this case, please post. If it's rather personally to me or time-critical, PM me for MSN or find on #OCteams on zirc network.
 
this sounds great..!! i'll try this when i get home.

i don't mind running fah on service, but i usually use text based client only. will this program works on that?
 
Unfortunatly, it's for service only.

I hadn't got time to modify it, but I'll improve it when only I can. Just now I have a little less need as both me and my bro have 2GB of RAM + tons of work @ studies.
 
Well all you have to do is lower the fah process's nice aka priority and the OS handles the rest as far handing out CPU cycles. If you run several threads however, it could be quite a pain. Also that C# code shouldnt have any issues compiling under linux with mono. Linux has native .NET support.
 
Back