Noi*_*ker 0 memory windows-7 virtual-memory memory-error
我注意到我的装有 Windows 7 x64 的 PC 经常说系统内存不足。当我同时打开一些“重”程序(如带有许多选项卡的 Firefox、照片编辑、CAD 等)时,就会发生这种情况。
我通过任务管理器仔细检查了使用的 RAM,但它从未达到限制。沉迷于此,有时系统会自动关闭程序。
今天我尝试运行一个内存很大的游戏(Black Ops 3),第一次尝试(打开 firefox)游戏崩溃了。关闭 firefox 游戏运行正常,但玩几分钟后又崩溃了。在这两种情况下,错误窗口都显示我指的是内存。即使在游戏日志控制台中也有“内存不足”或类似的提示。
我读了一些关于这个与分页文件相关的问题。我已禁用它,因为我有一个 250GB 的 SSD。
我希望有人可以帮助我,因为这很令人沮丧。
这里有一些硬件/系统细节:
编辑:我将添加更多信息以提供帮助。我试图重现错误,但我取得了部分成功。这里的结果和信息:
这是我通常在错误之前收到的警告。这是一个网络图像(我现在无法复制它)但内容是正确的。通常我在警告文本中使用 Firefox(或另一个我启动的第一个程序)作为应用程序名称。 点击查看图片,由于我是新来的,我还不能附上它们。
这是我在运行 Firefox 的情况下启动 Black Ops 3 游戏错误日志。由于游戏崩溃,Firefox 也崩溃了。
Command line:
Error: Waited 102 msec for missing asset "debug_sphere_exterior".
Error: Could not find material "debug_sphere_exterior".
Error: Could not find material "debug_sphere_interior".
Error: Could not find material "debug_sphere_exterior_nodepth".
Error: Could not find material "debug_sphere_interior_nodepth".
Error: Could not find material "postfx_dragonstrike".
Error: Could not find material "logo".
Error: Could not find material "mc/infrared_white".
Error: Could not find material "mc/hud_outline_model_green".
Error: Could not find material "mc/hud_outline_model_red".
Error: Could not find material "mc/hud_outline_model_orange".
Error: Could not find material "mc/hud_outline_model_white".
Error: Could not find material "mc/hud_outline_model_green_alpha".
Error: Could not find material "mc/hud_outline_model_red_alpha".
Error: Could not find material "mc/hud_outline_model_orange_alpha".
Error: Could not find material "mc/hud_outline_model_white_alpha".
Error: Could not find material "mc/hud_outline_model_green_calpha".
Error: Could not find material "mc/hud_outline_model_red_calpha".
Error: Could not find material "mc/hud_outline_model_orange_calpha".
Error: Could not find material "mc/hud_outline_model_white_calpha".
Error: Could not find material "mc/hud_outline_model_z_green".
Error: Could not find material "mc/hud_outline_model_z_red".
Error: Could not find material "mc/hud_outline_model_z_orange".
Error: Could not find material "mc/hud_outline_model_z_white".
Error: Could not find material "mc/hud_outline_model_z_green_alpha".
Error: Could not find material "mc/hud_outline_model_z_red_alpha".
Error: Could not find material "mc/hud_outline_model_z_orange_alpha".
Error: Could not find material "mc/hud_outline_model_z_white_alpha".
Error: Could not find material "mc/hud_outline_model_z_green_calpha".
Error: Could not find material "mc/hud_outline_model_z_red_calpha".
Error: Could not find material "mc/hud_outline_model_z_orange_calpha".
Error: Could not find material "mc/hud_outline_model_z_white_calpha".
Error: Could not find material "mc/sonar_weakpoint".
Error: Could not find material "mc/hud_outline_model_scriptint".
Error: Could not find material "mc/hud_outline_model_alpha_scriptint".
Error: Could not find material "mc/hud_outline_model_calpha_scriptint".
Error: Could not find material "mc/hud_outline_model_z_scriptint".
Error: Could not find material "mc/hud_outline_model_zonly_scriptint".
Error: Could not find material "mc/hud_outline_model_z_alpha_scriptint".
Error: Could not find material "mc/hud_outline_model_z_calpha_scriptint".
Error: Could not find material "mc/sonar_frontend_normal".
Error: Could not find material "mc/sonar_frontend_locked_gun".
Error: Could not find material "mc/sonar_frontend_token_locked_gun".
Error: Could not find material "fontcache".
Error: Could not find material "fontcache_distfield".
Error: Could not find material "fontcache_glow".
Error: Could not find material "fontcache_outline".
Error: Could not find material "fontcache_shadow".
Error: Could not find material "lui_loader_no_offset".
Error: Could not find weapon "killstreak_dogs_cp".
Error: Could not find weapon "killstreak_emp_cp".
Error: Could not find weapon "weapon_null_mp".
Error: Could not find weapon "weapon_null_cp".
Error: Could not find fx "_t6/impacts/fx_flesh_hit_neck_fatal".
Error: Could not find fx "_t6/misc/fx_ui_flagbase_pmc".
Error: Could not find fx "_t6/trail/fx_trail_blood_streak".
Error: Could not find fx "_t6/weapon/riotshield/fx_riotshield_depoly_dust".
Error: Could not find fx "_t6/weapon/riotshield/fx_riotshield_depoly_lights".
Error: Could not find fx "killstreaks/fx_heli_chaff".
Error: Could not find fx "lensflares/fx_lensflare_sniper_glint".
Error: Could not find fx "player/fx_plyr_clone_reaper_appear".
Error: Could not find fx "player/fx_plyr_clone_reaper_orb".
Error: Could not find fx "player/fx_plyr_clone_vanish".
Error: Could not find fx "player/fx_plyr_flashback_trail_impact".
Error: Could not find fx "player/fx_plyr_rejack_light".
Error: Could not find fx "player/fx_plyr_revive".
Error: Could not find fx "player/fx_plyr_revive_demat".
Error: Could not find fx "vehicle/fx_quadtank_airburst".
Error: Could not find fx "vehicle/fx_quadtank_airburst_ground".
Error: Could not find fx "weapon/fx_betty_light_blue".
Error: Could not find fx "weapon/fx_betty_light_orng".
Error: Could not find fx "weapon/fx_hero_pineapple_trail_blue".
Error: Could not find fx "weapon/fx_hero_pineapple_trail_orng".
Error: Could not find fx "zombie/fx_blood_torso_explo_zmb".
Error: Could not find fx "animals/fx_bio_direwolf_eyes".
Error: Could not find fx "dlc1/castle/fx_mech_dmg_armor".
Error: Could not find fx "dlc1/castle/fx_mech_dmg_armor_face".
Error: Could not find fx "dlc1/castle/fx_mech_dmg_body_light".
Error: Could not find fx "dlc1/castle/fx_mech_dmg_knee_sparks".
Error: Could not find fx "dlc1/castle/fx_mech_dmg_sparks".
Error: Could not find fx "dlc1/castle/fx_mech_foot_step".
Error: Could not find fx "dlc1/castle/fx_mech_foot_step_steam".
Error: Could not find fx "dlc1/castle/fx_mech_head_light".
Error: Could not find fx "dlc1/castle/fx_mech_light_dmg".
Error: Could not find fx "dlc1/castle/fx_mech_wpn_flamethrower".
Error: Could not find fx "dlc1/castle/fx_wpn_115_muz".
Error: Could not find fx "dlc2/island/fx_spores_cloud_ambient_lrg".
Error: Could not find fx "dlc2/island/fx_spores_cloud_ambient_md".
Error: Could not find fx "dlc2/island/fx_spores_cloud_ambient_sm".
Error: Could not find fx "dlc2/island/fx_thrash_chest_mouth_drool_1p".
Error: Could not find fx "dlc2/island/fx_thrash_eye_glow".
Error: Could not find fx "dlc2/island/fx_thrash_eye_glow_rage".
Error: Could not find fx "dlc2/island/fx_thrash_pustule_burst".
Error: Could not find fx "dlc2/island/fx_thrash_pustule_impact".
Error: Could not find fx "dlc2/island/fx_thrash_pustule_reinflate".
Error: Could not find fx "dlc2/island/fx_thrash_pustule_spore_exp".
Error: Could not find fx "dlc2/island/fx_thrash_rage_gas_leg_lft".
Error: Could not find fx "dlc2/island/fx_thrash_rage_gas_leg_rgt".
Error: Could not find fx "dlc2/island/fx_thrash_rage_gas_torso".
Error: Could not find fx "electric/fx_ability_elec_surge_short_robot".
Error: Could not find fx "electric/fx_elec_warlord_damage_1".
Error: Could not find fx "electric/fx_elec_warlord_damage_2".
Error: Could not find fx "electric/fx_elec_warlord_lower_damage_1".
Error: Could not find fx "electric/fx_elec_warlord_lower_damage_2".
Error: Could not find fx "explosions/fx_exp_robot_stage3_evb".
Error: Could not find fx "explosions/fx_exp_warlord_death".
Error: Could not find fx "fire/fx_fire_ai_human_arm_left_loop_optim".
Error: Could not find fx "fire/fx_fire_ai_human_arm_right_loop_optim".
Error: Could not find fx "fire/fx_fire_ai_human_head_loop_optim".
Error: Could not find fx "fire/fx_fire_ai_human_hip_left_loop_optim".
Error: Could not find fx "fire/fx_fire_ai_human_hip_right_loop_optim".
Error: Could not find fx "fire/fx_fire_ai_human_leg_left_loop_optim".
Error: Could not find fx "fire/fx_fire_ai_human_leg_right_loop_optim".
Error: Could not find fx "fire/fx_fire_ai_human_torso_loop_optim".
Error: Could not find fx "light/fx_light_body_glow_warlord".
Error: Could not find fx "light/fx_light_eye_glow_warlord".
Error: Could not find fx "player/fx_plyr_ability_screen_blur_overdrive".
Error: Could not find fx "player/fx_plyr_flashback_trail".
Error: Could not find fx "player/fx_plyr_heat_wave_distortion_volume".
Error: Could not find fx "player/fx_plyr_heat_wave_distortion_volume_air".
Error: Could not find fx "player/fx_plyr_shock_field".
Error: Could not find fx "player/fx_plyr_shock_field_1p".
Error: Could not find fx "vehicle/fx_exhaust_jetpack_warlord_juke".
Error: Could not find fx "zombie/fx_fire_torso_zmb".
Error: Could not find fx "zombie/fx_margwa_head_shot_zod_zmb".
Error: Could not find fx "zombie/fx_margwa_roar_purple_zod_zmb".
Error: Could not find fx "zombie/fx_margwa_roar_zod_zmb".
Error: Could not find fx "zombie/fx_margwa_teleport_intro_zod_zmb".
Error: Could not find fx "zombie/fx_margwa_teleport_tell_zod_zmb".
Error: Could not find fx "zombie/fx_margwa_teleport_travel_zod_zmb".
Error: Could not find fx "zombie/fx_margwa_teleport_zod_zmb".
Error: Could not find fx "zombie/fx_val_chest_burst".
Error: Could not find tagfx "ability_hero_heat_wave_player_impact".
Error: Could not find tagfx "gadget_flashback_3p_off".
Error: Could not find fx "zombie/fx_val_motes_100x100".
Error: Could not find weapon "smg_sten".
Error: Could not find weapon "pistol_revolver38".
Error: Could not find weapon "launcher_lockon".
Mem_Internal_MapPage failed
Run Code Online (Sandbox Code Playgroud)
首先,让我说你并不孤单。这几乎可以肯定是此处“Windows”+“内存”区域中最常见的问题。它很可能进入所有超级用户的前十名。我责怪微软没有很好地解释事情,没有为多个显示器的指标使用好的、一致的名称,并且没有为这个问题提供易于查找和遵循的答案,尽管它“受欢迎”。
简而言之,您的困惑是可以理解的,甚至是意料之中的。这不是你的错。
如果您看到“内存不足”、“内存不足”等来自 Windows 的弹出窗口,您真的、真的、 真的需要一个页面文件。或者增加您已有的尺寸。
(或者添加更多 RAM,但这并不容易。或者尝试一次运行更少/更小的程序,但没有人愿意这样做。)
我已禁用它,因为我有一个 250GB 的 SSD。
恕我直言,但这没有任何意义。如果您说“...因为我有 64 GB 的 RAM”,那会说得通。也许。但是拥有 SSD 并不意味着您不需要页面文件。
即使有 64 GB 的 RAM 也不能保证您不需要页面文件!
事实上,该错误消息告诉您您绝对需要一个页面文件。(或者更多的内存......或者你需要一次运行更少的东西和/或更小的东西。)
是的我知道。您不想将页面文件放在 SSD 上。我会在最后解决这个问题。
该错误消息是由耗尽称为“提交限制”的东西而不是 RAM 触发的。“已提交”,或者更确切地说是“专用已提交”以赋予其全名,是 Windows 中的一种虚拟内存。您可能知道“虚拟内存”的内容可以在 RAM 中找到,或者,如果没有空间容纳所有内容,其中一些内容将保存在磁盘(或 SSD)上。对于“私有提交的虚拟内存”,它保存在磁盘上的位置是页面文件。如果你有。
(还有“映射”虚拟内存,它使用其他文件而不是页面文件进行分页,还有不可分页的虚拟内存,它必须始终保留在 RAM 中。不可分页的虚拟机有助于“提交费用”,因此如果您有太多它会导致“内存不足”错误消息。映射内存没有那么重要,所以我不会在这里讨论太多。)
如果没有页面文件怎么办?您的程序仍然可以创建私有提交的虚拟内存。但是,自首次分配以来写入的所有已提交的虚拟内存必须始终保留在 RAM 中......直到它被释放(通常通过结束创建它的进程)......因为没有其他地方可供 Windows 使用收下。
“提交限制”——即你可以拥有多少提交的、至少写入一次的虚拟内存——因此只是你的 RAM 大小加上页面文件的当前大小。(如果您启用了页面文件扩展,则提交限制会随着页面文件的扩展而扩大。)
如果您查看 Windows 7 中的任务管理器、性能选项卡,您将看到如下所示的指示:
Commit (MB) 893 / 4095
这表示我的提交费用是 893 MB,我的提交限制是 4095 MB,即 4 GB。(这是来自运行 Windows 7 的虚拟机。它有 2 GB 的“RAM”和 2 GB 的页面文件 - 因此提交限制为 4 GB。)
当程序尝试分配已提交的虚拟内存时,会出现“内存不足”错误消息,并且由于系统的“提交费用”已经达到或接近“提交限制”,因此无法授予请求 - 足够接近请求,如果授予,将承担超过限制的费用。
请注意,只有在“提交”请求已经尝试并失败后,您才会看到此消息。因此,当您查看任务管理器时,问题的原因可能并不明显。
假设您还剩下 1 GB 的提交限制,并且某项尝试在一次调用中分配 1.5 GB。(这种情况不常见,但可能会发生。)内存管理器将拒绝请求,您将看到弹出窗口。但是当您查看任务管理器时,您仍然会看到之前的提交费用,还有 1 GB 未使用!令人困惑。任务管理器、资源监视器甚至性能监视器中也没有任何内容可以告诉您请求了多少。
(来自 sysinternals.com 的 Process Monitor 工具可能会有所帮助。)
该错误消息确实应该说“尝试提交(请求的大小)将超出提交限制”之类的内容,尽管这需要人们查找“提交限制”的含义,但它会更有用。嗯,这远不是 Windows 或我曾经使用过的任何其他操作系统中唯一没有帮助的错误消息。(他们至少可以在系统事件日志中添加更多详细信息!)
请注意,当你谈论“记忆”在Windows上,你应该总是限定它-你说的是“虚拟内存”或“物理内存”?很多人说“记忆”时他们可能是指两者之一。当他们真正谈论虚拟内存时,很多人会说“RAM”。这只会增加大家的困惑。
正如我之前所说,计算在提交费用中的东西是一种类型的虚拟内存。提交限制是您可以拥有的该类型虚拟内存的最大数量。您可以通过添加更多 RAM 和/或增加页面文件大小来增大提交限制。
我不明白为什么我需要使用具有 12GB RAM 的虚拟内存。
这是一个完全可以理解的问题。而且是很常见的一种。我再次责怪微软没有更好地解释事情。
简而言之:您需要一个页面文件,因为您的工作负载正在尝试分配比 RAM 多的“提交的虚拟地址空间”。
首先,术语:Windows始终使用虚拟内存,无论您是否有页面文件。摆脱页面文件只是排除了为提交的虚拟内存分页到磁盘;提交的 vm 仍然存在并且仍然是虚拟的,除了可分页到磁盘之外,其他方面都是虚拟的。
但是另一种主要类型的虚拟内存,称为“映射内存”,继续分页。只是不到页面文件。
所以你真正要问的是,如果你有 12 GB 的 RAM,为什么你的提交限制用完了?
好吧,那是因为无论您已经使用了多少,加上某些程序要求的金额大小,都会超出您的提交限制。
正如任务管理器中所报告的那样,即使您有足够的 RAM“可用”,您也可以看到该消息。反之,你可能不会看到消息-即提交尝试能够成功-即使你有小“可用”的内存。因为它不会抱怨可用的 RAM。它抱怨缺乏提交限制。
您的程序可能正在尝试分配大量已提交的虚拟内存。或者您可能有其他正在运行的东西正在使用提交。
现在有一件有趣的事情:当一个进程分配提交的内存时,它实际上并没有使用与提交数量相等的 RAM。因为它是虚拟的,记得吗?事实上,即使没有页面文件,也只需要很少的 RAM 来提交虚拟内存。它只是说“我''可能''想要使用最多''这个''大量已提交的虚拟内存。Windows,你能否向我保证(“提交”)即使我全部使用它也可以访问? ”
只有在程序实际写入该提交的内存之前——通过访问它并因此导致页面错误——RAM 才会真正脱离“可用”计数器并被添加到“使用中”。这是逐页发生的。如果您在提交区域内写入 10 页(每个 4K),则将使用 10 页 (40KB) 的 RAM。
(如果您也从它读取它也会发生这种情况,但是在写入之前从新分配的虚拟内存中读取几乎没有意义。)
很多时候,程序永远不会真正访问它提交的所有私有虚拟机,在这种情况下,使用的 RAM 将不等于提交的数量。(并且在具有页面文件的系统上,一些“已提交”的内容可能会移出到页面文件中,以便在 RAM 中为其他事情腾出更多空间……进一步减少已提交区域使用的 RAM。)
但是 Windows 无法知道有多少已提交的区域将被使用;在进行分配时,它别无选择,只能假设我“可能”实际上使用了所有这些。这意味着总共需要 1 GB 的实际存储空间来保存所有内容(可能其中一些在页面文件中,其余在 RAM 中)。
因此,除非所有当前的“提交”分配加上新的分配都小于提交限制,否则它无法批准该请求。
如果它无论如何都批准了该请求,那么就会存在实际用完 RAM 的风险,即由于没有可用的 RAM 而无法解决页面错误。这被认为是一个非常严重的问题。当程序尝试提交虚拟内存时,在操作系统和应用程序程序员上执行限制要容易得多。
有关这方面的更多信息,以稍微不同的方式解释,请参阅我的其他两个答案:此处(更长)使用了一些人认为有效的“银行贷款”类比。这个(更长)对操作系统内部发生的事情有更正式的解释。通常以几种不同的方式呈现相同的概念将帮助您克服症结所在。
这是一个附带问题,所以我把它移到这里......
所有关于 SSD 的网页都明确告诉禁用虚拟内存以避免磁盘磨损
对不起,但不,不是所有人都这么说,那些说的都是错的。现代 SSD 将在开始出现问题之前处理PB 级的写入。来自固态驱动器的支持和问答 (msdn):
页面文件应该放在 SSD 上吗?
是的。大多数页面文件操作是小的随机读取或更大的顺序写入,这两种操作都是 SSD 处理得很好的类型。
在查看来自数千条跟踪的遥测数据并关注页面文件读写时,我们发现
Pagefile.sys 读取的数量比 pagefile.sys 写入的数量大约为 40 比 1,
Pagefile.sys 读取大小通常非常小,67% 小于或等于 4 KB,88% 小于或等于 16 KB。
Pagefile.sys 写入相对较大,其中 62% 大于或等于 128 KB,45% 正好为 1 MB。
事实上,考虑到典型的页面文件参考模式和 SSD 在这些模式上的良好性能特征,很少有文件比页面文件更适合放置在 SSD 上。
这是一个更令人惊讶的事实:即使您可能需要一个页面文件来允许系统授予这些请求,但实际上写入页面文件的可能很少,甚至可能没有!同样,这是因为提交的虚拟内存量与实际使用的虚拟内存量之间通常存在很大差异。使用我们的意思是“写入并相应地分配 RAM 页面”。只有实际写入的私有提交的 vm 才会进入页面文件。大多数现代系统(如您的系统,具有 12 GB RAM)很少写入和读取页面文件。然而,页面文件通常是允许虚拟分配成功所必需的。也许这会让您放心将它放在 SSD 上。
归档时间: |
|
查看次数: |
1609 次 |
最近记录: |