骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买霸主CDKEY 购买战帆CDKEY
查看: 8890|回复: 5

[转贴] 战团多核优化

[复制链接]

54

主题

899

回帖

341

积分

见习骑士

游骑士战队[YQS]
联机ID:Apple_PAI

Rank: 3

UID
3218444
第纳尔
96
精华
0
互助
11
荣誉
0
贡献
0
魅力
26
注册时间
2021-1-30

战团正版勋章2022国庆青训杯冠军勋章第一届拿破仑中国刺刀联赛近卫勋章霸主正版勋章拿破仑正版勋章

鲜花(110) 鸡蛋(0)
发表于 2022-7-4 12:41:13 | 显示全部楼层 |阅读模式
本帖最后由 NEW_SHIT 于 2022-7-4 15:16 编辑

https://bbs.mountblade.com.cn/fo ... hlight=%B6%E0%BA%CB
原贴,还没测,原贴链接挂了,软件叫UnparkCpu,上网下个
(点击展开 / 收起)
并找使用方法吧
且我记得还有一个可以强制调用多于2G(骑砍只用2G)内存的软件,找不到了,神通广大的网友们请出手相救

前置:https://www.onlinedown.net/soft/34492.htm?TPSecNotice
苹果派真好吃嘿嘿嘿

101

主题

1217

回帖

460

积分

骑士

画院学徒

Rank: 4Rank: 4

UID
157244
第纳尔
2373
精华
0
互助
11
荣誉
1
贡献
0
魅力
12
注册时间
2009-9-22

战团正版勋章维京征服正版勋章元老骑士勋章汉匈决战正版勋章骑士美德之英勇勋章[杰出会员活跃勋章]

QQ
鲜花(97) 鸡蛋(0)
发表于 2022-7-11 08:30:05 | 显示全部楼层
哇哇哇收藏了
唯心不易

7

主题

43

回帖

20

积分

随仆

Rank: 1

UID
2565741
第纳尔
205
精华
0
互助
1
荣誉
0
贡献
0
魅力
0
注册时间
2015-7-21
鲜花(2) 鸡蛋(0)
发表于 2023-4-5 12:39:44 | 显示全部楼层
求强制调用多于2G的软件叫啥

25

主题

4034

回帖

1238

积分

骑士长

Rank: 5Rank: 5Rank: 5

UID
2781503
第纳尔
11133
精华
0
互助
4
荣誉
0
贡献
0
魅力
59
注册时间
2016-11-27

骑砍中文站APP会员勋章骑士美德之英勇勋章[杰出会员活跃勋章]霸主正版勋章元老骑士勋章战团正版勋章骑士美德之谦恭勋章[杰出会员财富勋章]

鲜花(98) 鸡蛋(1)
发表于 2024-8-7 14:38:56 | 显示全部楼层
毫无卵用。。。。后来的不用下了

1

主题

31

回帖

10

积分

随仆

Rank: 1

UID
3840361
第纳尔
0
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2026-1-13
鲜花(0) 鸡蛋(0)
发表于 2026-1-13 20:13:58 | 显示全部楼层
Warband has a 32-bit loader, which in itself limits to 4 GB RAM.
But of that, around 1/2 GB is reserved for access to/from Windows OS, and around 2 GB is textures and resource cache, which is probably where your idea of 2 GB limit is coming from.

  Of the roughly 1.5 GB that leaves us, some is actually hosting the Warband runtime library and engine and some additional overhead came from your mod and all of its metadata declarations, run time variables, all of the items, troops, parties, factions, scene props and so on data including all the slots assigned to hold additional data by class of item (troops, parties, agents, factions, items, scenes (as an index), scene props and so on.  

  WSE2 can help, a little, but it also has an overhead.
  Finally, disable any steam client overlay or Nvidia video capture overlays as they waste space.

  Then set texture memory to less than 100% to shrink the in-memory footprint of textures, turn ON "load textures on demand" and set the graphics resolution to less than you think is the best your monitor can display (I prefer no larger resolution than 1920x1080).

  Other than this there IS no > 4 GB memory access available to Warband.

  But to get back to the original post, regarding multi-core use,
Warband has the foreground thread you expected plus a second thread processing timers in the background.
This lets mods after Warband 1.168 run faster but get clobbered when one OSP decides to always put every script result into Register (0)  while at the same time some random simple_trigger initiated task is ALSO expecting reg0 to be their private hiding place for data.

   You can of course select   Advanced option: Force single threaded mode   at Warband  BEFORE starting your mod to get back to a single thread but unless your CPU has a turbo mode for one thread, 2 threads are faster.  There might be a brief use of a third thread during post-rendering, but most mods will not use it.

  Anything after that becomes  Lua threads as called by the lua extension from WSE2 and this means the mod itself needs to
both have a portion of the scripting in Lua and correctly manage the threading.  This is a wild frontier right now for Warband, and something I find of great interest.  I never was keen on fancy graphics but this is the sort of thing that I find interesting when modding.

1

主题

31

回帖

10

积分

随仆

Rank: 1

UID
3840361
第纳尔
0
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2026-1-13
鲜花(0) 鸡蛋(0)
发表于 2026-1-14 14:23:05 | 显示全部楼层
Thinking about this later,  I realized the correct words were "Lua LANES" for the "run a thread tied to a specific CPU core" for Warband.
Lua Lanes DOES have support in WSE2, although the Lua implementation does NOT offer the full Lua libraries needed to perform all Lua commands.

   This means it may be difficult or impossible to know enough about the runtime environment or hardware to correctly assign a thread to a processor core, just as I can write a text file and read it back, but only at a single directory tree and only if I know the filename in advance.  I cannot in Warband's WSE2 Lua even search a directory or leave the workspace lua allows for reading or writing, nor read or write in binary mode for file access.

  Another aspect is a lua lane takes a relatively long time to load and is better used for very CPU intensive long tasks, rather than small/short tasks.

  Finally, when deciding how many lua lanes can or should be running at once, remember that the player could be running something besides Warband, such as Open Broadcast Software or another streaming software to broadcast to file their game session, so besides Windows background tasks plus Warband engine plus any postFX frame processing there may be other software using CPU resources at that instant.

  If those are the obstacles to a modder, where is the biggest benefit to remaking/rewriting mods?
  I believe the biggest and least attempted is exactly coop, especially a coop based on single player mode play as opposed to the current multiplayer server-client method.   Single player to coop currently uses "battle time" kit but single player mode mods do not handle multiple enterprises at a town, or multiple players (thus cannot assume trp_player == troop ID 0).  Some of the troop identities must change to virtual players or the mod completely rewritten to allow a v_player to sit anywhere in the range of heroes rather than assumed to be at troop ID 0.  

   For a single player mode mod to be rewritten as I intend, the entire mod needs to be torn up and remade, as any test that assumes the player is troop ID 0 will always fail for "limited multiplayer".  At parties, support for multiple enterprises implies changes to defined slots storing enterprise, infrastructure such as manor or school or other improvements (why not monastery? hospital? temple?)   so that more than one player can own these at the same town.  But most of all, synchronizing every random dice roll is a CPU expensive activity, when not coming from a server but instead rolled locally.  This is because even a simple check to hit, once for example a projectile in flight is found to intersect an agent in battle, involves a hidden random roll which may not use the same pseudo-random  numbers you and the other coop nodes expect, so every such function has to be explicitly performed either in lua or a mix of warband script-and-lua so that the check performed locally at user A is the same result as seen locally at user B, assuming no network bandwidth is wasted sending results from node to node.  The only thing I want to see sent was the seed value for the psuedo-random number generator, and any general commands to a team, and the one and only player's changes, all else to be done locally as if a single player game, at each node in the coop.

This to me is the high frontier.  Nobody has done it successfully in Warband.  I mean - noone at all.  I don't believe in impossible half so much as "it is very hard, so people stopped trying".  Impossible tells me I should look outside the box and find a new method.

  Well, I guess I get neither a like nor a follow nor even any respect for mods I worked on, since any moron can claim to be some has-been coder.  I don't even know this site checked my credentials.  You could see my posts at   Taleworlds forum, looking up "gsanders", but I am not the top person nor the best modder.  I am old, sick, and tired, but I really want to make a mod to do these things.  I just realized I need to do it in steps, layer by layer, and plan 4-5 stages to get there, while I am still at the start of stage II and thus have very little to show that seems "wow".  But in my opinion, China has the fresh young and hungry potential, plus a little more polite people, than in Europe (where I have a lower reputation to be honest).  Maybe this is the best reason for coming here.

   Sorry about all the English.  I am sure google will butcher this, in either direction, but it is all I have.  At least I have been embedding my source code in my last mods, and I think some newer mods here already use (some of) it. Once more thanks for your time.

  - GS
您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2026-2-2 14:58 , Processed in 0.097105 second(s), 26 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表