Analyze why Windows is slow with 1G memory _windowsxp

Source: Internet
Author: User
Tags file copy memory usage sleep function advantage
Now the memory basically reached the average price of 1 yuan/mb, many friends of the computer farewell to the poor 64MB, 128MB memory, 256MB has become a standard preparation, 512MB and even 1GB memory is no longer "sensational." But there is one thing that makes many friends wonder: "Why is my Windows startup, my software running at such a slow rate using 1G of memory?" "

After installing the large capacity memory, the system, the program operation efficiency has not been greatly improved, because the system itself operating mechanism limits its ability to manage and use the hardware resources. So even if the hardware resources are very rich, if it is beyond the scope of Windows management, then performance will not be significantly improved.

   memory and hard disk

Many novices often confuse physical memory with hard drives, because the capacity of both is expressed in megabytes or gigabytes, indicating that the best metaphor for the relationship between physical memory and hard disk is a small office with a table and a filing cabinet.

Cabinets are like hard drives, programs and data can be safely stored there for a long time, the desktop represents physical memory, and the person who works on the desk (the same as the processor) directly uses any files (Programs and data) placed on the desktop. In order to operate on a particular file, you must first remove the file from the cabinet and place it on the desktop. If your desktop is large enough, you can open multiple files on your desktop at the same time. Similarly, if you have more physical memory, you can run more or larger programs and process more or larger data.

Adding more disk space to your computer is like putting a larger file cabinet in your office, and adding more memory is like getting a bigger desk that can operate on more programs and data at the same time.

   One, Windows uses memory like this

To understand why system speed improvements are no longer noticeable, you must first know how Windows uses memory. Here is a concept--resources.

This is not usually referred to as CPU resources, memory resources or Unified "system" resources. The next "resource" We'll talk about is the Windows object that the program can manipulate. For example, each window displayed on the screen is a resource, and each picture can be a resource. If an application opens a file on disk, the open file is also a resource. By analogy, if an application needs to use a resource, it will request the operating system to create a new one or call from memory.

   1. Scenario reappearance: A dialogue between program and system

The program says, "Hi, Windows, I'm going to create a 300-pixel-wide, 200-pixel-high window, OK?" "So windows immediately creates or invokes this resource into memory as required, and then feeds back to the application a code name:" Well, I've created the window you want, and it's code-named #38710. "After that, when you need to use this new window, the application uses the code of Windows feedback to represent the resource." "Windows, please show #38710 in the upper left corner of the display screen." "Good!" said the man. "Finally, when the application does not need to use the resource, it asks Windows to remove the resource." "OK, please delete #38710." "Good!" said the man. "。

   2. Pointer--in-memory ZIP code

So what standard is this code based on? In most operating systems, it is determined by something called a "pointer." You can think of the whole memory as a post office, and the postman classifies the letters that need to be sent to various places in many different mailboxes. One after another, the mailbox occupies a wall. Each forestall contains a number of letters containing information to be sent to a specific area. And, like every area has a zip code, each piece of memory that can store data has an address-pointers. Represents a string of numbers for this storage space. A "pointer" to a portion of the data in memory, the address of the first memory space occupied by the data. So, if I were an ordinary operating system, one application asked me to call a window, and I would call this window into memory as it told me, and if the resource's data was stored in memory at the address of #1234567, I would return a message to the application: "Well, I pulled up this window and it was #1234567. "

   3. Troubleshoot problems with pointers

In PCs, this pointer has a length of 4 bytes. So if an application needs to give a pointer to one of the data in memory, it needs 4 bytes of memory space. This way of working in the early Windows designers brought a lot of trouble, because the production process is not developed, memory is very expensive, a computer with 8MB of memory is enough to allow users to wake up countless times from the dream, most computers can only configure 4MB memory. When memory is so tight, an application often needs millions of of resources. To use these resources, you need to allot a pointer to each resource. Each pointer occupies 4 bytes, millions of pointers, and consumes an objective amount of memory space. This is like a small amount of money, but if you want to send the people of the whole country a share of money, that is at least 13 million yuan.

As a result, Windows designers have adopted another alternative. They created the Resource table. is to register the information of all resources currently in memory into a single list. This way, when the application asks the system to call a resource, the system calls it without giving it a pointer, but tells the application the number of the resource in the Resource table directly. "Well, I've already called the resources you need, and it's in the Resource table the serial number is #383" because the need is not a memory address, so you can use a only 2-byte number to represent. This is just a two-byte gap. But when you have only a few megabytes of RAM, and the program you run runs a lot of resources, the two-byte gap can be a big advantage.

   you know what?

   Microsoft 64-bit operating system does not have 1GB memory don't play

In 32-bit Windows 2000/XP, the maximum support for 4GB of memory, each application can only use 2GB memory, because the other half of the memory is left to the system to use. In 64-bit Windows XP, this limit is not available, each program can fully use 4GB memory, in addition to Windows, Microsoft is also developing 64-bit version of SQL Server 2000 and Windows Server2003, but to run these applications, You need to have at least 1GB of RAM in your computer.

  4. As the passage of the passage, the plan becomes defective

But this approach also has its drawbacks--two bytes can represent a very limited number of different

We can do an experiment: please write a different number. If you write only one number, you can write only 10 different numbers. If you limit the number of write two digits, although you can write more, the total is still limited. And so on, the more you allow the number of digits, the more different numbers you can write. However, as long as the number of digits is limited, the total number of different numbers written is always limited. Similarly, if the system is allowed to use a 4-byte ordinal number, then under this "bit limit" there can be billions of different ordinal numbers to use. However, if only the system uses 2-byte serial number, the number that can be used will be reduced to 65,536. Therefore, the resource table we talked about before can not be stretched infinitely. which has a maximum number of 65,536

So the question came. When you call 65,536 resources, and then want to invoke more resources, even if the memory space is 1GB, enough to store tens of billions of resources, but only 2-byte resource table can not generate more serial number! Without the ordinal, it means that the resources cannot be distinguished from each other, and the application cannot use these resources without the account. In fact, because no serial number is available, the system cannot call more than 65,536 resources at the same time.

But in the era of 10MB memory is wishful thinking, to call hundreds of thousands of resources at the same time is simply "nonsense." So the Windows designers did not take this issue to heart, decisively chose the Resource table, selected 2-byte serial number.

Today, the operating system has been rewarded. The memory is cheap, the resource table and the 2-byte serial number still give us the memory space, but the disadvantage is far more than the benefits it brings. We have enough memory space to call millions of resources, but there are only 65,536 serial numbers in the Resource table! So at the same time, there are only 65,536 resources in memory! Is there 1GB of memory space available? Wait for it!

   5. Who is the real "resource-consuming"?

Understand the above truth, it is not difficult to distinguish in addition to large files, large programs, the real consumption of system resources are what programs:

★ Call a large number of small resources to decorate the desktop of the gaudy software

★ Various multimedia playback software

★ Monitor the system's tool software

★ Applications that can preview fonts in the Font menu (such as Ms Office)

In addition, when you run a 16-bit program (such as a DOS program) in Windows 9x n/me, Windows delimits a piece of memory for use by all such programs. This memory will not be freed unless all 16-bit programs are turned off.

   6. Where is the advantage of large memory?

Does the big memory have no effect? Memory vendors in the scam? Of course not. When an application is started, some of the Windows components are also started, which is a common thing. When the application is shut down, Windows retains those components and does not shut down because it is likely to be used soon. Similarly, a small number of resources that redeployment memory when the program starts, and do not exit memory as the program shuts down.

At this time, the large memory can be reflected at times. On the one hand, large memory can hold a large amount of data at once, reduce the use of memory hard disk as a virtual memory use of the probability, improve the speed of data invocation. On the other hand, after closing the program, more commonly used data will have enough space to remain in memory and not be purged. Once you restart the program, you will find it significantly faster than using small memory!

   second, the main memory usage Essentials

   1. Turn the memory into your hard drive

If your memory is really rich, then you can use Microsoft specifically for the Windows2000 design RAMDisk, it can make some of the memory virtual into a hard disk, the original stored in the hard disk data virtual into memory. For example, place Windows temporary files, temporary files for the Internet, into this virtual disk. As you know, the speed of memory is much faster than hard disk, this can greatly improve the speed of data reading, make Windows more efficient, and because the data is actually stored in memory, so the data will disappear after shutdown, so it can enhance the security of the system to some extent.

The first step: Download RAMDisk from Http://www.download.mocrosoft.com/download/win2000ddk/sample01/1/nt5/EN-US/ramdisk.exe. and unzip it into a temporary folder, such as C:\RAMDISK

Step Two: Click "Start è set è control Panel", double-click to open Add/Remove Hardware, then select Add/Exclude device failure and click Next button, select the Add new device item in the Choose a hardware Device window that appears, and then click Next, and in the next window, select No, I want to select hardware from the list and click Next. Next, select Other devices in the Hardware Type list and click Next, and in the window that appears, click the "From Disk" button to set the vendor file replication source to C:\ in the Eject from Disk Setup window RAMDISK, when you are sure that the Selection window appears, select the RAMDISK Driver item in the Model list, and click Next, Windows appears with the "digital Signature Not Found" dialog box, and click Yes to install it.

Step three: Open Notepad, enter the text, and save it as a Ramdisk.reg

Windows Registry Editor Version 5.00

[Hey_local_machine\system\curentcontrolset\servioes\ramdisk\parameters]

"Breakonentry" =dword:00000000

"DebugLevel" =dword:00000000

"Debugcomp" =dword:ffffffff

"DiskSize" =dword:01f00000

"DriveLetter" = "R:"

"Rootdirentries" =dword:00000200

"SectorsPerCluster" =dowrd:00000002

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]

"TEMP" = "r:\\"

"TMP" = "r:\\"

[Hkey_current_user\environment]

"TEMP" =r:\\ "

"TMP" = "r:\\"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]

"Cache" = "r:\\"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]

"Cache" = "r:\\"

[Hkey_users\. Default\environment]

"TEMP" =r:\\ "

"TMP" = "r:\\"

[Hkey_users\. Default\software\microsoft\windows\currentversion\explorer\shell Folders]

"Cache" = "r:\\"

[Hkey_users\. Default\software\microsoft\windows\currentversion\explorer\user Shell Folders]

"Cache" = "r:\\"

When you are done, double-click Ramdisk.reg to import it into the registry. The above registry data can be downloaded at www.cfan.com.cn.

   Small Tips

The key meaning in the Ramdisk.reg file is:

Parameters: Set Ramkisk to R, size 30.9MB

Session Manager\Environment: Sets the system's TEMP and TMP environment variables to virtual drive R.

Heky_current_user\environmnet: Set TEMP and TMP environment variables for current user to virtual drive R

Both HKCU Shell Folders: Sets the current user's Internet temporary files to virtual drive R.

Hky\. Default keys: Set TEMP, TMP, and Internet temporary files for default users to virtual drive R

Fourth step: shutdown, and then restart the Windows2000 can be.

   Small Tips

Of course, Microsoft provides a relatively simple ramdisk function, there are some more powerful online memory virtual software, such as RAMDisk.

   2. Modifying the registry to play a large memory advantage

Now open Registry Editor, find [Hkey_local_machine\system\currentcontrolset\controlsession manager\momorymanagement], and modify the key values in the right pane (Note that the setup is done on the premise that memory is best over 512MB and is limited to Windows 2000/XP).

(1) "LargeSystemCache" (starting a large system cache): A large memory space is opened in memory for the pre read operation of the disk file system. When a program continuously requests more data, Windows automatically reads through the system cache, allowing the program to get the data it needs at the fastest speed. Enabling this system buffer consumes more physical memory, which reduces the amount of available physical memory that can be exploited by the program. Set its value to 1. In this way, the system cache is increased from 4MB to 8MB.

(2) "Secondleveldatacache" (Improve CPU Performance): CPU processing speed is much greater than the memory access speed, and memory is much faster than the hard disk. In this way, between the CPU and memory, between memory and disk to affect the performance of the bottleneck, the previous "LargeSystemCache" is designed to alleviate memory and disk bottlenecks, and the CPU in order to be able to quickly obtain processing data from memory also set a buffer mechanism L2 cache ( Second-level cache). Adjusting this key allows Windows to better match the CPU's ability to use the caching mechanism to obtain higher data pre-read hit rates. It is recommended that you set it to 512

(3) Disablepagingexecutive (Disable paging file): Change its value to 1 (hexadecimal), which makes it mandatory for all programs and data to run in physical memory instead of using virtual memory. Obviously, when there is enough physical memory to complete the required tasks, this will make the system performance greatly improved. Enabling a user with only 64MB of memory may be a disaster--the system is frequently faulted until it crashes.

(4) "Iopagelocklimit" (custom input/output buffer size): The input and output system is the channel between the device and the microprocessor to transmit data, and the data transmission will be more fluent when the buffer size is enlarged. Similarly, the size of the specific setting depends on the size of the physical memory and the number of tasks to run, in general, if the memory has 64MB, you can set the 16 value of the Double-byte key to (1MB), (2MB), or 1000 (4MB) 128MB memory can be set to 1000 (4MB), Watts (8MB) or 4000 (16MB); 256MB Memory 4000 (16MB) or 8000 (32MB). Of course, if you have more memory, you can set it to 10000 (64MB) or even more. When set to 0 o'clock, Windows is automatically configured.

   Small Tips

It is said that this setting can also effectively solve the problem of BT download damaged disk.

3. Can windows98/me use 1GB ram?

Windows98/me does not support more than 1GB of memory, and when memory exceeds 128MB, special adjustments are required to enable the system to better manage and use memory, and to avoid system failures caused by large memory. All of the key settings revolve around Vcache (virtual high-speed memory).

   you know what?

   What is Vcache?

It is windows for hard disk allocation, as a high-speed buffer of physical memory, can greatly improve the hard disk read and write speed, similar to the use of Dos SMARTDRV. To put it simply, Vcache is a space that Windows automatically allocates in physical memory to hold code and data that has been used and which Windows believes will be reused, so that when new programs require the use of the code and data, they do not have to read from the hard disk and read directly from memory , so the speed will be a lot faster, thus greatly improving system performance.

(1) 128MB~512MB

According to experts, if the memory is 128MB~512MB, it is best to open c:\windows\system.ini find [Vcache] in Notepad, find a line beginning with "Maxfilecache=", and set its value to 70% of physical memory ( Since the values used here are in kilobytes, you need to use mb*1024 or bytes/1024 formulas to convert the data, for example: Your memory is 128MB, then it should be 128*0.7*1024=91750.4 (about 91750KB), which should be written as " maxfilecache=91750 "

(2) 512MB or more memory

Some friends will find that when the memory is increased to more than 512MB, start windows98/me or open the DOS window, the system will prompt "low memory."

This is mainly because the windows98/me processing is larger than 512MB memory defects, it is best to make the Vcache MaxFileCache value of 512MB (524,288KB), that is, "maxfilecache=524288."

(3) 1GB memory

If the memory reaches 1GB or higher, then windows98/me can continue to reboot, crash, or reboot during Windows Update.

To resolve this problem, you also open the System.ini file and add "maxphyspage=40000" in the [386Ehh] field. This allows you to limit the memory control read by Windows below 1GB.

If you are unable to enter Windows, you can press CTRL until the Startup menu appears, and then select command Prompt only to enter "edit System.ini" and return at the command prompt, and then in [386EHH] field to add "maxphyspage=40000".

   4. Turn off hibernation

Many users like the sleep function, this can achieve fast boot function, but for large memory computer, in the case of not often read, write hard disk, it is best to turn the hard disk sleep function off, because sometimes it will cause a crash failure.

   5. Have large memory can not be virtual memory?

Often see a lot of articles introduced, and then have a large memory, you can disable the virtual memory. Fact For example: Windows98/me is more than 512MB of memory is congenitally deficient, greater than this amount of memory, WINDOWS98 will be unstable and slow startup speed. If you use large memory plus disabling virtual memory, the instability will increase further.

In addition, the design of Windows itself is that once a process is found to be inactive, the memory space allocated to it is mapped to the swap file, as much as possible to empty out the physical memory to the other activity, rather than using the physical memory to start using the swap file. Because if you wait until the physical memory is exhausted, it is too late. In the preparation of a lower computer is bound to cause data transmission and processing stagnation. Therefore, the prohibition of virtual memory in principle, the most likely to cause Windows anomaly, in a timely manner does not appear to run the failure, will also be frequently prompted virtual memory is not enough, please reset and so on.

   you know what?

According to ASUS experts, when using the Intel 850/850E chipset motherboard, if with 2GB Rambus memory, the computer will appear unstable phenomenon. This is due to the limitations of the INTEL850/850E chipset, and Intel recommends that the number of chips per memory be ≤ 24. And the current domestic sales of Rambus 256 memory chip number is 8, RAMBUS512MB memory of the number of chips is 16, so when users use too much memory is likely to appear unstable phenomenon.

   6. Make large memory a hard drive

If you have more than 512MB of memory, and there is a new one or an maxtor, then the maxboost of the company is worth a try, which is said to improve the performance of the hard disk by a large amount, with a maximum of about 60% of the hard drive performance. The software is actually a disk drive, replacing the WINDOWS2000/XP disk drive, can be used for different applications automatically in the system memory to set a suitable size cache, read and write data before reading and buffering, the use of disk read and write data in a refusal to publish technical details of the "Advanced Algorithm", So as to effectively improve the disk read and write speed, to enhance the application and system speed. According to some experts, the software, although not the official claim that the magic, but it does in the file copy and other operations. Of course, because the maxboost is still in the testing phase, so there are still some problems, so we recommend that ordinary players in the software after the formal launch of the use.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.