问题标签 [hard-drive]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
objective-c - 您如何找到 Cocoa 中剩余的磁盘空间?
我想我希望能够找到任何存储,而不仅仅是系统磁盘,但这是最重要的。
c# - FileStream 在应用程序冷启动时非常慢
如果您有兴趣,这里也提出了一个非常类似的问题,但是我们将看到该问题的公认答案并非总是如此(而且我的应用程序使用模式也并非如此)。
性能确定代码由 FileStream 构造函数(用于打开文件)和 SHA1 哈希(.Net 框架实现)组成。该代码几乎是我在上面链接到的问题中提出的 C# 版本。
情况1:应用程序第一次或第N次启动,但目标文件集不同。现在告诉应用程序计算以前从未访问过的文件的哈希值。
- ~50ms
- 80% FileStream 构造函数
- 18% 哈希计算
案例 2:应用程序现在完全终止,并重新启动,要求计算相同文件的哈希:
- ~8ms
- 90% 哈希计算
- 8% FileStream 构造函数
问题
我的应用程序始终在用例 1中。永远不会要求它重新计算已经访问过一次的文件的哈希值。
所以我决定速率的步骤是 FileStream Constructor!我能做些什么来加快这个用例的速度吗?
谢谢你。
PS Stats 是使用 JetBrains 分析器收集的。
c# - C# getdrives 类型固定但没有 USB 硬盘?
我想检索系统中的固定磁盘列表。但是 C#s GetDrives 固定驱动器包括插入式 USB 硬盘。
知道如何检测到固定驱动器不是 USB 硬盘,反之亦然?
visual-studio - 外部硬盘驱动器上的 Visual Studio 2008?
我的笔记本电脑在安装 Vista Ultimate 时出现安装错误,现在它不允许我运行 Visual Studio。我能够毫无问题地在我的 HP TouchSmart 上安装 Visual Studio 2008,现在我在那里使用它。我希望能够旅行。所以我想知道我是否将安装 Visual Studio 的文件夹放在我的外部硬盘驱动器上,然后从那里运行它。这可能吗?我之前已经设法用其他程序做到了。
mysql - 不断变化的数据的最佳存储引擎
我目前有一个应用程序使用 130 个 MySQL 表,所有表都带有 MyISAM 存储引擎。每个表每秒都有多个查询,包括选择/插入/更新/删除查询,因此数据和索引不断变化。
我面临的问题是硬盘无法应对,I/O 访问的等待时间长达 6 秒以上,而 MySQL 完成了如此多的读/写操作。
我正在考虑更改为仅 1 个表并使其基于内存。不过,我从来没有将内存表用于有这么多查询的东西,所以我想知道是否有人可以就这是否是正确的做法给我任何反馈?
storage - 如何轻松地将存储添加到安装了 XP 的 VirtualBox 机器?
当我在VirtualBox机器上安装 Windows XP 时,我将硬盘驱动器设置为仅10 GB,并假设它会扩大大小(据我所知, VMWare中的硬盘驱动器也是如此,这不是真的吗?)。
无论如何,我正在尝试在此 Virtual Box XP 映像上安装 Visual Studio 2010 测试版,但磁盘空间已用完。
谷歌搜索答案,我发现像这样的复杂教程,向您展示如何“在几个小时内”增加 VirtualBox 硬盘的大小。
但我无法想象这会很难:
- 增加虚拟磁盘的大小(毕竟是虚拟的)
- 创建一个 20 GB 的新硬盘驱动器,然后将其作为 D: 或 E: 驱动器附加到虚拟机中
如何在安装了 XP 的 VirtualBox 机器上轻松添加存储空间?
flash - flash 将 ByteArray 写入磁盘上的文件
我需要使用 Flash AS3 将 ByteArray 写入本地磁盘上的文件。flash 应用程序在本地运行(它是一个投影仪 exe)。
我发现 FileReference 类具有完美的 save() 函数。唯一的问题是,这个函数会打开一个文件浏览器,让用户选择存储文件的位置。但是-我已经将路径作为字符串保存到该位置而无需用户操作(因为我一次性将大量文件导出到该目录中,并且不希望用户手动选择每个文件)。
有没有办法在不打开文件浏览器的情况下将字节数组从投影仪存储到本地磁盘?
我也在使用 mdm Zinc,它实际上提供了将 ByteArray 保存到磁盘的功能,但是由于某些未知原因,此功能无法正常工作。我已经提交了一个错误报告,但我需要非常紧急地让它工作,所以我正在寻找替代品!
谢谢!
ram - 硬盘驱动器和 RAM 内存 - 动态电源管理
从我所看到的情况来看,当涉及到 CPU 时,Windows 和 Linux 中的动态电源管理都得到了很好的支持(缩放频率以降低能耗)。是否有类似的支持来管理硬盘驱动器和 RAM(旋转 HDD、降低 RAM 频率或任何可能导致功耗降低的事情)?
bootstrapping - 引导硬盘访问
我正在尝试编写一个引导加载程序来获得乐趣,我一直在使用以下指南:
http://www.omninerd.com/articles/PC_Bootstrap_Loader_Programming_Tutorial_in_ASM
http://hem.passagen.se/danma/nboot.htm
http://en.skelix.org/skelixos/tutorial01.php
我能够成功地从软盘复制扇区,但是当我尝试访问硬盘时,我从除重置之外的所有 int 13 函数返回错误代码。重置磁盘不会返回错误。
在 int 13 适用于硬盘之前,我需要做些什么特别的事情吗?
c++ - Writing data chunks while processing - is there a convergence value due to hardware constraints?
I'm processing data from a hard disk from one large file (processing is fast and not a lot of overhead) and then have to write the results back (hundreds of thousands of files).
I started writing the results straight away in files, one at a time, which was the slowest option. I figured it gets a lot faster if I build a vector of a certain amount of the files and then write them all at once, then go back to processing while the hard disk is occupied in writing all that stuff that i poured into it (that at least seems to be what happens).
My question is, can I somehow estimate a convergence value for the amount of data that I should write from the hardware constraints ? To me it seems to be a hard disk buffer thing, I have 16MB buffer on that hard disk and get these values (all for ~100000 files):
Or is this just a coincidence ?
I would also be interested in experience / rules of thumb about how writing performance is to be optimized in general, for example are larger hard disk blocks helpful, etc.
Edit:
Hardware is a pretty standard consumer drive (I'm a student, not a data center) WD 3,5 1TB/7200/16MB/USB2, HFS+ journalled, OS is MacOS 10.5. I'll soon give it a try on Ext3/Linux and internal disk rather than external).