Jump to content

m0nkey

Member
  • Content Count

    262
  • Joined

  • Last visited

  • Medals

Everything posted by m0nkey

  1. m0nkey

    Ram drive - a batch file to help you

    What do you mean? like -mod="path\to\file.pbo" ? And that will load the entire .pbo into memory? Is there any info on what the files in the addons directory are, like what resources might be in certain naming conventions or which ones would be used the most? I know when I put the majority of them in a ram drive, the entire experience is "smoother" if you will.
  2. m0nkey

    Ram drive - a batch file to help you

    I put in my 780gtx today, and found the same fps really, but with a much lower vram use and lower gpu useage. Cpu, in my case an i7 2600k @ 4.4g and 16gb ram, the first physical core usually runs at 90% or so. Sometimes the other cores (virtuals too) will go up a bit, maybe to 7% each. I've disabled core parking with a batch file (two files to toggle) and I made one for toggling basic color, which helps a little. Anyway, I can certainly see a difference and feel it, as my new video card is not at 98% like a single 570 would have been. I had two 570s in sli and the most I could get typically would be 60fps by myself and in coop missions, usually about 30-40. It depends on the mission of course. Each gpu, depending, might use 50-60% gpu cycles and at most, each roughly 256mb vram. So, the new card is good and all, but the performance should be better. Thats okay, I like the game so much as long as it plays smooth the fps is not an issue. I found another tweak today, that puts the profile directory in ram. It is supposed to get rid of little "stalls" that happen when something is written to an .rpt file. I have an ssd drive, and started using the -nologs startup parameter, but did find putting the profile in ram helped what little stutter I had to about disappear. So here is a revised batch script which takes care of adding the profile to ram drive. @echo off REM ===================================================================================== REM =========== ArmA 3 Ram Drive Super Nifty and Handy Helper Thing erm, Tool =========== REM =========== by m0nkey - Jan 22, 2014 =========== REM ===================================================================================== :: install a ram disk application (I used SoftPerfect one) :: determine which files from the Addons directory you want to load from ram :: MOVE these files to a directory that will be copied to the ram drive when you want to play (ie. ram_Addons) :: RENAME the Addons directory (ie. hdd_Addons) to something. These will be files that load from the hdd :: create a ram disk that is big enough to house your chosen set of files (ie. those in the ram_Addons directory) :: this batch file will take care of creating the symbolic links so that arma THINKS the files are on the hdd :: when they are actually on the ram drive (or however many you moved to the ram_Addons directory) :: to remove, first delete the directory Addons in the arma 3 directory :: *remember this is just a symbolic link to the ram drive now* :: delete all files on ram drive (or delete the ramdrive forcefully) :: thats it. Next time you want to play, run this batch script again :: to set things back to "normal" 100%, just rename your hdd_addons directory back to just "Addons" :: and MOVE the files from the ram_Addons directory back to the now "real" Addons directory :: added code to also put the profile directory into ram drive :: create directory on ram drive (ie. profile) :: use that value in the appropriate place below :: when batch file executes, the original profile directory name is changed, the files are copied :: to the ram drive and a junction point is made which will point to the ram drive :: set the ram drive letter set "ram_drive=r" :: set the ram drive directory that will house the game files set "ram_dir=addons" :: set the ram drive directory that will house the profile files (.rpt files) set "ram_profile_dir=profile" :: set the hdd directory that has game files to be loaded from ram drive set "ram_files=c:\arma 3\ram_addons" :: set arma 3 directory set "arma=c:\arma 3" :: set the hdd directory that has game files to be loaded from hdd set "hdd_files=c:\arma 3\hdd_addons" :: check if ram drive addons directory exist if not exist "%ram_drive%:\%ram_dir%" goto :no_ram_addon :: check if ram drive profile directory exist if not exist "%ram_drive%:\%ram_profile_dir%" goto :no_ram_profile :: check if the hdd files directory exists if not exist "%hdd_files%" goto :no_hdd_addon :: check if real arma 3 profile exists if not exist "%LocalAppData%\arma 3" goto :no_local_profile :: copy the files to the ram drive start /wait xcopy "%LocalAppData%\Arma 3" "%ram_drive%:\%ram_profile_dir%" /S :: rename the original profile directory rename "%LocalAppData%\Arma 3" "Arma 3-org" :: create a junction point for arma 3 to use the ram drive mklink /J "%LocalAppData%\Arma 3" "%ram_drive%:\%ram_profile_dir%" :: copy files from hdd to ram drive start /wait xcopy "%ram_files%" "%ram_drive%:\%ram_dir%" :: create symbolic links - let ram drive think it has the files that are actually on the hdd :: these files will actually be loaded from the hdd for /f "usebackq delims=|" %%f in (`dir /a-d /b "%hdd_files%"`) do mklink "%ram_drive%:\%ram_dir%\%%f" "%hdd_files%\%%f" :: create symbolic link - make virtual Addons directory that arma will use that points :: to the ram drive Addons directory mklink /J "%arma%\addons" "%ram_drive%:\%ram_dir%" echo. echo. echo Ending Main pause exit :no_ram_addon cls echo. echo Did not find %ram_drive%:\%ram_dir%. Exiting. goto :bye :no_ram_profile cls echo. echo Did not find %ram_drive%:\%ram_profile_dir%. Exiting. goto :bye :no_hdd_dir cls echo. echo Did not find %hdd_files%. Exiting. goto bye :no_local_profile cls echo. echo Did not find "%LocalAppData%\arma 3". Exiting. :bye echo. pause exit Here is a batch file to disable core parking for when you game powercfg -setacvalueindex scheme_current sub_processor 0cc5b647-c1df-4637-891a-dec35c318583 100 powercfg -setactive scheme_current Here is a batch file to enable core parking again when you are done gaming powercfg -setacvalueindex scheme_current sub_processor 0cc5b647-c1df-4637-891a-dec35c318583 5 powercfg -setactive scheme_current Here is a batch file to toggle basic color of win7 SC START uxsms || SC STOP uxsms Do note, I put only bare minimum error checking in, so you might want to comment out the @echo if you have issues to see what is going on, and add some pauses at key locations. Finally, I've tried many of the tweaks going around. Sometimes some of them work, sometimes not. Its annoying, but the way it is. One thing I did find interesting was using the -cpuCount=4 parameter, then setting the affinity to the 4 physical cores. There was no performance gain really. But what did happen was that core0 was not constantly sitting at 90%. In fact it hits an average 60% now, while the other 3 cores float between 35 to 50%. Average cpu % use goes from about 29% without this method to about 35% using this method. Maybe squeezing a tiny bit more cpu cycles for arma, don't know. But I liked it because I can spread the cycles out across many cores rather than just one. I don't know physically where the cores are located on the chip, but I like to think one of them always (like 85% of the time) running at pretty much full speed is not as good for longevity of the cpu as all 4 cores running. I am a heat fanatic though, so who knows.
  3. Just so I get this straight, and because it would seem to be a useful tool, when evaluating in this manner variable = (condition) > 0 is akin to stating in more basic like syntax if (condition) > 0 then variable = 1 (or true) else variable = 0 (false) endif Thats handy to know if thats the case. Thank you gents for passing it on! ---------- Post added at 22:49 ---------- Previous post was at 22:39 ---------- Okay, that should work. AddAction is creating a menu item that essentially does an execVM on the script? So rather than making a trigger with onact being the execVM of the script, its just a shortcut? lol, I am asking because I am also trying to understand how the nature of scheduled vs non-scheduled threads work, now call/spawn/exec work and how to best create scripts that behave themselves. Yep, I've played a lot of missions I downloaded and seen some that bog things down, and don't want to make that mistake, so the learning curve is quite steep ;) Thanks for the infos.
  4. Sounds like count has no way to exit once it starts. No biggie, just wondering. Only elements counted are the ones that meet the condition. Got it. I am super curious now as to why the var would hold a boolean if you use the > 0 . The wiki says the return value is a number. Why is this then? Thanks for the input btw.
  5. Hmm. Understood. In the interest of understanding this, might I pose a further question? Your example hint str ({alive _x} count (group player)); The wiki says so you have a condition -- {alive _x} when each element is tested, if it tests as true (alive) count is increased by 1? And count continues to the end of the bounds of the array, every time? Thus the output is the count of elements within the "group" array that are "alive". Correct? Is there an exit from the count loop at all? Forgive me, I don't have an IDE for this language, and don't know how to run scripts and display outputs in a manner that makes testing easy. Normally I would just put in a console output or msgbox and run the script to see what happens. There must be a way to do this but I haven't gotten there yet. Anyway, if I look at the example from the code optimisation page _someoneIsNear = {_x distance [0,0,0] < 1000} count allUnits > 0; is it saying this - condition -- if distance of array element (referenced by _x) is less than 1000, value (the output or return) of count is incremented by 1 after count steps through all elements of array, count will equal the number of conditions that were true Is that what is going on here? I think it is. What does the > 0 do? Is that saying to count "allUnits > 0"? I think so. Documentation is not what I am used to at all with this script language lol. Thanks for taking the time to explain this so far!
  6. Thank you for replying. Actually I have seen all of those resources. Over and over it seems lol. My questions stemmed from these and So, while I understand arrays and how to manipulate them, I don't understand how to apply using count in place of forEach in my example. Maybe you cannot, which is what I am trying to figure out. I am interested in this because, as I learn the arma scripting language, I want to start with good habits. Sometimes its the simple small things that can make the biggest differenct. The best example I've actually used would be in one language, when you concatenate you traditionally would use i = i + 1 while this is quite acceptable, there are crazy performance increases by using this instead i += 1 granted we're talking about several hundred elements in an array or parsing a text document, but learning these little "secrets" about what is the optimal methods to use is what I am trying to learn. Thanks. edit: would it be something like this? { if (alive _x and _x!=player) then {arr_livepeeps set [count arr_livepeeps, _x];}; } count units _squadpeeps; where the stepping of _x comes as count goes through each "units" of array "_squadpeeps"? Thats pretty simple if its the answer. Of course, count vs forEach might not be enough performance difference to worry about, but gotta learn what you can I suppose :)
  7. Hmm. I thought I read that the Guaranteed packets were TCP and Nonguaranteed were UDP. That made sense to me that TCP would be used for what I would consider more "critical" data whereas the UDP being broadcast to everyone, would be more generic. I might get a chance at some point to check and see. I've run many dedicated servers in the past, but none quite like arma. I've read literally hundreds of guides/posts about performance, settings and tweaks for both client and server, and honestly its like a crap shoot as to whether you will get good performance or not. I've got some healthy machines that run it so-so and some not so healthy machines that I am shocked run as well as it does. Either way, its a lot to absorb for sure. I dabbled in most of the arma titles, but not really been a fan until 3 came out. I am not sure I would have been asking for 10 years myself, especially with no answers. But if you dig the arma versions prior to 3 like I do 3, I can certainly understand why. Thanks for all the effort you put into this. It makes newcomers like me have an easier time for sure, even if its still somewhat missing legitimate answers from the devs.
  8. I have a quick question regarding the bandwidth logic. If we suppose that, according to the BIS studio basic.cfg info, we were to use these values Could we assume the following to be an accurate assumption? 256 max messages per cycle Max Size of UDP packets (Nonguaranteed) would be (default) 256 byte * 8 = 2048 bits Max number of 2048 bit packets per cycle = 256 Thus we have possible up to 524,288 bits per second of UDP broadcast packets, going to ALL clients with information regarding general data like positions etc. Not taking into account any header data. Max Size of TCP packets (Guaranteed) would be (default) 512 byte * 8 = 4096 bits Max number of 4096 bit packets per cycle = 256 Thus we have possible up to 1,048,576 bits per second of TCP packets, which are addressed to a specific client and contains more specialized information such as where you bullet hit or if you take damage. Not taking into account header data etc. So, with up to 256 messages per cycle as a max: UDP packets to everyone would require a connection of (outbound) 65KBps TCP packets to one client would require a connection of (outbound) 131KBps If we would assume then that 50% of the packets on any given cycle were UDP broadcasts, and the other 50% were destined over TCP to a single connected client, could we not assume that: UDP would require 33KBps TCP would require 65KBps Total requirement (for 1 client) could then be 98KBps? If we were to then add a second client, could we not assume that the estimated 50% of TCP packets the client would need would also be 65KBps, and that the cumulative total bandwidth needed for 2 clients on TCP would be 130KBps. This would bring the bandwidth needed to meet the maximum messages per cycle (at 50% duty load UDP and 50% duty load TCP) for 2 clients to be: client 1 - 65KBps TCP client 2 - 65KBps TCP all clients - 33KBps UDP Total 165KBps (approx) Could it not also be assume then, using these paramater values and this 50% duty cycle idea, that each client connected would require 65KBps upload bandwidth plus the broadcast bandwidth of 33KBps. Which could make a simple calculation, such as : 10 clients (10 x 65KBps) for TCP + 33KBps for UDP = 680KBps (approx) or a 5.4mbps connection? Just wondering if my logic is sound regarding both the math, but more importantly if the UDP packets, as broadcasts, need not be factored in but once because as broadcast packets, they are destined everywhere anyway.
  9. I found in that situation for myself, I had to extract a given coop mission (in this case) and make sure there was no unit set to player (which most have set) but instead make everyone "playable". This fixes I think every mission that I have downloaded that is coop that I have tried. You can also do a basic test by getting into server "lobby", pressing chat key (/ is default) and then typing #login <your server admin password> then #missions you should now be able to choose a default MP mission. If the default missions work, you know its a map/mission issue. Thats what I've found anyway.
  10. been plugging away slowly at learning about arma 3. as i am learning more about dedicated servers, it strikes me that many are trying to find ways to keep thier server running if it is shutdown. firedaemon and batch scripts. neat stuff, but there is a better solution. i use it for teamspeak servers and i used it for lanbridger for awhile. its a project located here xynt service basically i have the executable of this project that i rename, such as "team_speak_server.exe". There is an INI file it uses. You pass a command line argument and a few other settings (like timeouts) and thats pretty much it. You then run the executable with a command line switch to create a service (of your own naming) and thats it. Copy the executable and INI file, change a few parameters and rename them, and use it for something else. My timeouts state that after 30 seconds to restart teamspeak if it is killed for some reason. You could easily have a .bat file to start the server and point xynt service to that .bat file. Or even easier, just use your .bat file command line within the xynt service INI file. anyway I thought I would share this. its worked wonders for me for many years now. cheers. EDIT: almost forgot. this creates a service you can enable/disable and start/stop. just killing the process won't mean much as since it is now a service, after your timeout it will restart. what i do is have a couple batch files on the desktop. i named my service "TS3_Service" so my batch files state sc start ts3_service to start and sc stop ts3_service to stop you can also use net start ts3_service or net stop ts3_service but "net" commands are much slower than sc (service control) commands and not only can you do more with sc commands but they show you more verbose info if there is an issue. FYI.
  11. m0nkey

    Low CPU utilization & Low FPS

    I'm very suprised a new registration does not let you create a post. Presumed guilty I suppose. Too bad, I had a good performance tip with some code to help others. As to your question, I know a guy who has an APU like this, but with win7. He was able to run A3 on low but with decent frames, maybe in the 50 range. But, everything on low. A3 is a bit different than most games. Some rigs with 4+ghz i7 cpu and nvidia 780sli cannot see more than say 40 gpu load. Other machines, for example an i5 2500k at 3.6ghz say, will get on medium settings 50fps and max gpu load. You can try all the command line parameters, some say they work. I understand them to be limits though, not used to "use" more, only to not limit what "could" be used. I've gotten mid 40's to mid-high 50's on a single 570gtx with i7 2600k non-overclocked (thats 3.4ghz approx). Add in another 570 in sli and you get 60fps with vsync on. This is on medium-ish settings. A3 is, again, sort of different. Some settings you crank up, some you disable. There are other methods to use that get you some good frame increases, like 10-20fps - depending. Not every system will get results from the same settings. We'll see if a reply unlocks posts. If not, I'll just go back to Armaholic, where they welcome noobs by allowing them to post new message. Unless of course I missed something here, but I don't think so.
×