disk

Difference between sequential write and random write

和自甴很熟 提交于 2019-11-27 09:36:12
问题 What is the difference between sequential write and random write in case of :- 1)Disk based systems 2)SSD [Flash Device ] based systems When the application writes something and the information/data needs to be modified on the disk then how do we know whether it is a sequential write or a random write.As till this point a write cannot be distinguished as "sequential" or "random".The write is just buffered and then applied to the disk when we will flush the buffer. Please correct me if I am

Direct disk access in windows (C#)

寵の児 提交于 2019-11-27 06:53:37
问题 I want to be able to read and write data directly to and from a disk (i.e. at a sector / cluster level) but I've yet to find a suitable tool for doing this under windows. I've been trying to figure out how to write my own in C#, but the documentation I've found is sparse and only deals with C++ APIs. Whats the best way of reading /writing directly to / from a drive in C#? (or can anyone recommend me a tool that allows me to read / write directly from a drive?) 回答1: pinvoke.net has a

Why overwrite a file more than once to securely delete all traces of a file?

核能气质少年 提交于 2019-11-27 05:43:20
问题 Erasing programs such as Eraser recommend overwriting data maybe 36 times. As I understand it all data is stored on a hard drive as 1s or 0s. If an overwrite of random 1s and 0s is carried out once over the whole file then why isn't that enough to remove all traces of the original file? 回答1: A hard drive bit which used to be a 0, and is then changed to a '1', has a slightly weaker magnetic field than one which used to be a 1 and was then written to 1 again. With sensitive equipment the

How do we access MFT through C#

梦想的初衷 提交于 2019-11-27 05:14:09
问题 I need to access Windows MFT(Master File Table) using C# in my .net application. I have googled about this and couldn't find any good results. I have been searching for the information from the past 2 days but have been unable to find any information on the same. I am not looking for exact code to do the same, I am just looking for some information which can get me started. The only thing I have been able to figure out is that I have to use P/Invoke. I want to know the functions I would be

Is there any way of detecting if a drive is a SSD?

左心房为你撑大大i 提交于 2019-11-27 03:50:00
I'm getting ready to release a tool that is only effective with regular hard drives, not SSD (solid state drive). In fact, it shouldn't be used with SSD's because it will result in a lot of read/writes with no real effectiveness. Anyone knows of a way of detecting if a given drive is solid-state? Detecting SSDs is not as impossible as dseifert makes out. There is already some progress in linux's libata ( http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-04/msg03625.html ), though it doesn't seem user-ready yet. And I definitely understand why this needs to be done. It's basically the

How much faster is the memory usually than the disk?

为君一笑 提交于 2019-11-27 00:30:54
IDE,SCSI,SSD,SATA or all of those. I'm surprised: Figure 3 in the middle of this article, The Pathologies of Big Data , says that memory is only about 6 times faster when you're doing sequential access (350 Mvalues/sec for memory compared with 58 Mvalues/sec for disk); but it's about 100,000 times faster when you're doing random access. Random Access Memory (RAM) takes nanoseconds to read from or write to, while hard drive (IDE, SCSI, SATA that I'm aware of) access speed is measured in milliseconds. 2016 Hardware Update: Actual read/write seq throughput Now the Samsung 940 PRO SSD reading at 3

How do I retrieve disk information in C#?

好久不见. 提交于 2019-11-26 20:29:00
I would like to access information on the logical drives on my computer using C#. How should I accomplish this? Thanks! For most information, you can use the DriveInfo class. using System; using System.IO; class Info { public static void Main() { DriveInfo[] drives = DriveInfo.GetDrives(); foreach (DriveInfo drive in drives) { //There are more attributes you can use. //Check the MSDN link for a complete example. Console.WriteLine(drive.Name); if (drive.IsReady) Console.WriteLine(drive.TotalSize); } } } Foozinator What about mounted volumes, where you have no drive letter? foreach(

Manipulate an Archive in memory with PHP (without creating a temporary file on disk)

落爺英雄遲暮 提交于 2019-11-26 17:38:13
I am trying to generate an archive on-the-fly in PHP and send it to the user immediately (without saving it). I figured that there would be no need to create a file on disk as the data I'm sending isn't persistent anyway, however, upon searching the web, I couldn't find out how. I also don't care about the file format. So, the question is: Is it possible to create and manipulate a file archive in memory within a php script without creating a tempfile along the way? nettle I had the same problem but finally found a somewhat obscure solution and decided to share it here. I came accross the great

How to empty/flush Windows READ disk cache in C#?

时光怂恿深爱的人放手 提交于 2019-11-26 16:29:40
问题 If I am trying to determine the read speed of a drive, I can code a routine to write files to a filesystem and then read those files back. Unfortunately, this doesn't give an accurate read speed because Windows does disk read caching. Is there a way to flush the disk read cache of a drive in C# / .Net (or perhaps with Win32 API calls) so that I can read the files directly from the drive without them being cached? 回答1: Why DIY? If you only need to determine drive speed and not really

Clear file cache to repeat performance testing

若如初见. 提交于 2019-11-26 14:11:47
What tools or techniques can I use to remove cached file contents to prevent my performance results from being skewed? I believe I need to either completely clear, or selectively remove cached information about file and directory contents. The application that I'm developing is a specialised compression utility, and is expected to do a lot of work reading and writing files that the operating system hasn't touched recently, and whose disk blocks are unlikely to be cached. I wish to remove the variability I see in IO time when I repeat the task of profiling different strategies for doing the