How to find out how much a file weighs. swap file. Proper configuration of the paging file and its optimal size. How to determine the size of disk or flash drive space
Hello dear readers! Today we open a series of articles about optimizing a computer on Windows OS. We'll start with something like . In this article you will find answers to such questions: Where is the paging file?; How to properly configure the swap file?; How to set the optimal paging file size for different amounts of RAM?. Go!
swap file (pagefile.sys) is a system file on the hard disk (usually on the system disk) of a computer, which serves as an addition (extension) to the RAM. This extra memory is also called the computer's virtual memory.
Virtual Memory- a method of managing computer memory for executing programs that require large amounts of RAM than is actually on the computer. Such programs get the missing RAM from the paging file. In other words, the paging file offloads RAM during periods of heavy load.
RAM is many times faster than swap file memory. If you simultaneously run several applications in the system that consume a lot of RAM, then the data of unused ones will be unloaded from RAM to a slower virtual memory. Active applications will be served directly by random access memory (RAM). Also, if, for example, a minimized application is expanded, then the data from virtual memory will again be transferred to RAM.
How to customize the swap file and change its size?
Competent, Proper configuration of the paging file will help significantly speed up your computer.. It would be a sin not to use it. Where can you set it up?
- For Windows XP:
Start > Settings > Control Panel > System > Advanced > Performance > Settings > Advanced > Change - For Windows 7/8/Vista:
Start > Settings > Control Panel > System > Advanced System Settings > Performance > Settings > Advanced > Virtual Memory > Change
Up to point Performance can also be reached by entering the sysdm.cpl command at the command line Run(command prompt can be opened by pressing WIN+R).
If you did everything right, you should be in the window Virtual Memory. By default, in Windows 7/8/8.1/10, the size of the paging file is determined automatically by the system itself.
As you can see in the picture, the paging file can be configured for each partition (and each disk) separately. To set your swap file size:
- At the very top of the window, uncheck the box Automatically choose swap file size.
- Select the partition (or physical disk) for which the paging file is configured.
- Put the radio button in the item Specify size , specify the Initial size and Maximum size(indicated in megabytes)
- Be sure to click the button Ask.
To disable the paging file, set the switch to No swap file.
The size of the Windows paging file. Which one is correct?
There are different versions on the account of the optimal swap file size. I will give my point of view on this subject, which is based on my observations and experiences with the swap file on various hardware. It may coincide with the opinions of some IT professionals. I am a supporter of the version that if a computer has 6-8 GB or more of RAM, then paging file can be disabled altogether. I think that large volumes of the paging file only slow down the computer. Of course, if the amount of RAM is less than 6 GB, then of course it is better to set a certain amount of additional virtual memory.
How to correctly set the size of the swap file? The minimum swap file size must be the same as the maximum. For example: 512-512 , 1024-1024 , 2048-2048 is correct padding, while 512-1024 , 1024-2048 is incorrect padding.
The same indicators of the minimum and maximum size of the paging file reduce this file, and this consequently speeds up the process of reading information from it.
Now, depending on the amount of RAM, let's see what size of the paging file you need to set. There are the following examples:
- the optimal swap file size for 512 Mb of RAM is 5012 Mb;
- the optimal swap file size for 1024 Mb of RAM is 4012 Mb;
- the optimal swap file size for 2048 Mb of RAM is 3548 Mb;
- the optimal swap file size for 4096 Mb of RAM is 3024 Mb;
- the optimal swap file size for 8 GB of RAM is 2016 Mb;
- the optimal swap file size for 16 GB of RAM (and more), - no swap file.
Of course, this is a subjective view and these indicators cannot be absolutely accurate, recommended, but in practice they were the ones that gave the effect. You can experiment and find the best combination for your computer. There are some notes here as well.
For example:
- Some applications require a swap file. Disabling it may cause errors in such applications. If you disable virtual memory on the system drive, it will also become impossible to write a memory dump during BSOD's (Blue Screen of Death).
- If, as a rule, you minimize several applications, leaving them running, and switch to others yourself, then here you may also need a large amount of swap file, since the data of minimized applications is written to it. Although, here it all depends on the volume RAM.
Correct location of the swap file. Which disk to include?
If you have several physical disks on your computer, then you need to install the paging file on the fastest disk. It is believed that the swap file is divided into 2 parts:
- The first part on the system disk (partition) (just for writing debugging information during blue screens of death)
- The second part on the fastest drive
In this case, the system during operation accesses the least loaded partition, without touching the first one.
It is also recommended to create a separate partition for the swap file, with the amount of memory equal to or close to the size of the swap file (for example, 2024 MB). This trick allows you to get rid of the fragmentation of this file.
Results:
I hope the tips in the article will help you properly configure the paging file on your computer and optimize its performance. If you have any questions, write in the comments, I will try to give exhaustive answers to them.
To measure length, there are such units as millimeter, centimeter, meter, kilometer. It is known that mass is measured in grams, kilograms, centners and tons. Time running is expressed in seconds, minutes, hours, days, months, years, centuries. The computer works with information and there are also appropriate units of measurement for measuring its volume.
Bit and byte - the minimum units of information
We already know that a computer perceives all information.
Bit- this is the minimum unit of measurement of information, corresponding to one binary digit ("0" or "1").
A bit is only 0 ("zero") or only 1 ("one"). With one bit, two states can be written: 0 (zero) or 1 (one). A bit is the smallest unit of memory, nothing less. This cell can store either a zero or a one.
Byte consists of eight bits. Using one byte, you can encode one character out of 256 possible (256 = 2 8). Thus, one byte is equal to one character, that is, 8 bits:
1 character = 8 bits = 1 byte.
Letter, number, punctuation mark are symbols. One letter, one symbol. One number is also one character. One punctuation mark (either a period, or a comma, or a question mark, etc.) is again one character. One space is also one character.
In addition to the bit and byte, of course, there are other, larger units of information.
Byte table:
1 byte = 8 bits
1 Kb (1 Kilobyte) = 2 10 bytes = 2*2*2*2*2*2*2*2*2*2 bytes =
= 1024 bytes (approximately 1 thousand bytes - 10 3 bytes)
1 MB (1 Megabyte) = 2 20 bytes = 1024 kilobytes (approximately 1 million bytes - 10 6 bytes)
1 GB (1 gigabyte) = 2 30 bytes = 1024 megabytes (approximately 1 billion bytes - 10 9 bytes)
1 TB (1 Terabyte) = 240 bytes = 1024 gigabytes (approximately 1012 bytes). Terabyte is sometimes called ton.
1 Pb (1 Petabyte) = 2 50 bytes = 1024 terabytes (approximately 10 15 bytes).
1 exabyte= 260 bytes = 1024 petabytes (approximately 1018 bytes).
1 Zettabyte= 270 bytes = 1024 exabytes (approximately 1021 bytes).
1 Yottabyte= 2 80 bytes = 1024 zettabytes (approximately 10 24 bytes).
In the table above, powers of two (2 10 , 2 20 , 2 30 , etc.) are the exact values of kilobytes, megabytes, gigabytes. But the powers of the number 10 (more precisely, 10 3 , 10 6 , 10 9 , etc.) will already be approximate values, rounded down. Thus, 2 10 = 1024 bytes represents the exact value of a kilobyte, and 10 3 = 1000 bytes is the approximate value of a kilobyte.
Such an approximation (or rounding) is quite acceptable and generally accepted.
The following is a byte table with English abbreviations (in the left column):
1 Kb ~ 10 3 b = 10*10*10 b= 1000 b – kilobyte
1 Mb ~ 10 6 b = 10*10*10*10*10*10 b = 1 000 000 b - megabyte
1 Gb ~ 10 9 b - gigabyte
1 Tb ~ 10 12 b - terabyte
1 Pb ~ 10 15 b - petabyte
1 Eb ~ 10 18 b - exabyte
1 Zb ~ 10 21 b - zettabyte
1 Yb ~ 10 24 b - yottabyte
Above in the right column are the so-called "decimal prefixes", which are used not only with bytes, but also in other areas of human activity. For example, the prefix "kilo" in the word "kilobyte" means a thousand bytes. In the case of a kilometer, it corresponds to a thousand meters, and in the example of a kilogram, it is equal to a thousand grams.
To be continued…
The question arises: does the byte table have a continuation? In mathematics, there is the concept of infinity, which is denoted as an inverted eight: ∞.
It is clear that in the byte table you can continue to add zeros, or rather, powers to the number 10 in this way: 10 27 , 10 30 , 10 33 and so on ad infinitum. But why is this necessary? In principle, while terabytes and petabytes are enough. In the future, perhaps even a yottabyte will not be enough.
Finally, a couple of examples on devices that can store terabytes and gigabytes of information.
There is a convenient "terabyte" - external HDD which connects via USB to a computer. It can store a terabyte of information. Especially convenient for laptops (where the change hard drive can be problematic) and Reserve copy information. It's better to do it in advance. backups information, not after everything is gone.
Flash drives come in 1 GB, 2 GB, 4 GB, 8 GB, 16 GB, 32 GB, 64 GB and even 1 terabyte.
First of all, let's say that we will talk about the FAT and NTFS file systems, as the most common ones, and nothing will be said about the file systems used in non-Windows systems, since such systems lie outside the scope of the author's interests. And now - to business.
It would seem, what kind of ambiguity can be, if we talk about the file size. How much data was written into it, such is the size (or length). How many bytes does it have from beginning to end (and this number is recorded in the file system as the size of the file), such is the size, right? As Shelmenko the orderly said, so it is, but only a trifle is not so.
Do an experiment. Take any executable and copy it with the command
copy something.exe something else.exe
If you have encountered this before, you already know that the resulting file will be much shorter than the original and will not be a copy. The reason is simple: the copy program, launched without the /b option, copies the file until it encounters a byte with code 27h, this character is called the “end of file”.
So, we already have two different signs of the end of the file - by the number recorded in the file system, and by a special byte in the file body. True, it is worth noting that the second sign has remained since the times when files were predominantly text and is now practically not used.
In file systems that use clusters, and FAT and NTFS refer specifically to such file systems, there is also a third size - the size of the file on disk, that is, the total size of the clusters allocated to this file. In FAT file systems, this size over size the actual file or equal to it. The difference between the sizes, if any, is the so-called file tail - this is wasted disk space, a fee for placing files in clusters, and not end-to-end one after another, although file systems with such file placement also exist.
However, sometimes this place is used. In particular, in the days of floppy disks, there were programs that allowed you to write data to the tails of files in order to covertly transfer information on such diskettes. After all, it is impossible to get access to the tails of files by standard means.
If we include NTFS into consideration, then the picture will be supplemented with new touches.
First of all, the size of the file on disk may be smaller than the actual size of the file.
If the body of a file fits into the free area of an MFT file record, then the file does not occupy any clusters on the disk.
The maximum size of such a file depends on the size of the record and is approximately 600 bytes for a small record (1 KB) and 3600 for a large record (4 KB). However, it should be noted that until recently, Windows showed the size of such a file on disk as equal to one cluster, although in fact no cluster was allocated to the file.
If the file is compressed, then its size on disk can be noticeably smaller than the actual length of the file (the amount of data in it).
The so-called sparse files further complicate the picture. They contain useful data only in certain sections of the file, and the rest of the file is not used at all. Take as an example the changelog file \$Extend\$UsnJrnl found on almost every computer (don't try to see it in Explorer or other file managers, it won't work).
It can be several gigabytes long, but it usually contains only 32 megabytes of meaningful data at the very end. And the rest of the data does not contain any data at all, it does not take up disk space, and when you try to read data from this part, the system will issue a set of zeros without even accessing the disk.
If the reader wishes to experiment with sparse files, such a file can be created using the fsutil sparse command. And at your leisure, you can think about what the real length of the file is if the system has written the number 4 GB in the corresponding column, and the real data in the file is only 32 MB and it also occupies 32 MB on disk.
And finally, let's talk about one more length: the length of valid data (valid data). This length, and the functions that set it, are almost exclusively of interest to programmers, but it may occasionally be encountered by ordinary users.
In FAT file systems, this concept does not exist, and functions that use this value write zeros in the file body in the appropriate places. In NTFS, this length is a characteristic of the file.
Let's try to explain what we are talking about with an example. Take a flash drive (a flash drive is used for clarity, since it works slower than a hard drive with large amounts of data) larger than a gigabyte, formatted in FAT32, and create a large file on it with the command
fsutil file createnew k:\trial.txt 900000000
If the letter assigned to the flash drive is different from K, then correct the command accordingly.
You will see that the procedure for creating the file will be quite long, half a minute or even more (although the message "file created" will appear immediately, you will have to wait for the command prompt to appear). This is not at all surprising, because the description of the () command says that the file being created consists of zeros. And the file we got was 858 megabytes, so writing it should take not so little time.
Now format the flash drive in NTFS, for the purity of the experiment it is better to take the same one, and repeat the file creation. This time, the operation will take place almost instantly. It is no longer necessary to write zeros to the file body, it is enough to allocate space for the file and set the length of the actual data to zero for it. The body of the file will contain “garbage” that was written in these sectors, but when reading the data, this data will not be accessed - having found that the length of the actual data is zero, the system will not read everything that is further than this zero - after all, this data invalid. They can be made valid by changing the valid data length value.
Let's look at this with an example. Create a new file on one of the NTFS-formatted scratch drives. Hundreds of megabytes are completely optional, a dozen or two kilobytes will be enough:
fsutil file createnew C:\trial.txt 10000
Now open it with any file viewer like FAR.
As you can see, there are indeed zeros in the file. But if you look at this file using some disk editor that accesses sectors directly, such as dmde, then the picture will be different.
If we open volume C as a logical device and look at the contents of the file, we will see the same zeros.
But if you open the disk as a physical device, then in the same sector (pay attention to the LBA numbers - the difference in 63 arose due to the fact that the beginning of the partition is shifted relative to the beginning of the disk) we will see data that was previously written to some later remote file.
And if we increase the length of the actual data, we will see this data in the file. Set this length to 300 bytes:
fsutil file setvaliddata C:\trial.txt 300
Note that the parameter in this command cannot be set arbitrarily, but must be no less than the current valid data length value and no larger than the file size. You cannot reduce the length of valid data with this command.
Now look again at the contents of the file. Note that we did not write any data to it!
Purely by chance, it turned out that there is quite a lot of meaningful text in this file, which makes the picture more visual. 300 decimal bytes is 12c hexadecimal bytes, and it is on this byte that the text breaks off and zeros begin. If we move the border of valid data even further, then the following lines will “appear” as well.
Summing up
There are two physical file lengths - the size of the file as recorded in the file system and the space it takes up on disk. There are also two logical file lengths - this is the end-of-file sign (byte EOF - 27h) and the length of the actual data. How constituent part of logical length, you can also consider empty areas in sparse files - remember \$Extend\$UsnJrnl, where a large array of missing data ends with thirty-two megabytes of real data.
So, usually, when people talk about the length of a file, they mean the number stored in the file system. But, as you can see, options are possible!
Each file and each folder with files occupies a certain place on the computer. That is, all files and folders have a volume, in other words, weight or size.
We are used to such concepts as grams and kilograms, meters and kilometers. The computer also has its own units of measurement. In them we will measure files and folders. In other words, we will determine how much this or that file or folder "weighs". This "weight" is calculated in bytes, kilobytes, megabytes and gigabytes.
Now let's get down to practice. Look at this size chart:
This is very simple circuit. It is decoded like this:
1 KB = 1024 bytes; 1 Mb = 1024 Kb; 1 GB = 1024 MB
And now in more detail:
- One KB (kilobyte) contains 1024 bytes
- One MB (megabyte) contains 1024 KB (kilobytes)
- One GB (gigabyte) contains 1024 MB (megabytes)
Why do we need dimensions? For example, in order to determine whether we can write a file / folder to a disk or flash drive.
In order for us to be able to determine this, we need to know how much information fits on a disk or flash drive. Let's use the scheme:
Flash drive - from 1 GB
CD disk - 700 MB
DVD disc - from 4 GB
The standard size of a DVD disc is 4.7 GB. There are also double sided DVDs. This means that the record can be on two sides - both on one and on the second. These drives have a capacity of 9.4 GB. Dual-layer discs also exist, but are less common. Such disks have the following volumes: 1-sided 2-layer - 8.5 GB; 2-sided 2-ply - 17.1 GB.
How to find out the size of a file or folder
To find out the size of a file or folder with files, move the cursor (arrow) over it and hold for a few seconds. A small window will appear with the characteristics of the file or folder. As you can see in the picture, this characteristic indicates the size:
If nothing appears when hovering over a file or folder, then right-click on that file or folder. From the list that opens, select "Properties". A window will open showing the size of this file or folder.
Now let's practice determining the size:
Task:
We have a 30 MB file. Can we burn it to disk? 1 GB flash drive?
Solution:
A CD can fit 700 MB. Our file is 30 MB in size. 700 MB is more than 30 MB. Conclusion: the file will fit on a CD.
A DVD disc holds 4.7 GB. One Gigabyte equals 1024 Megabytes. That is, about 5000 MB is placed on one DVD disc. And 5000 MB is much more than 30 MB. Conclusion: our file will fit on a DVD.
We were given a 1 GB flash drive. One GB contains 1024 MB. 1024 is more than 30. Conclusion: the file will fit on a 1 GB flash drive.
I propose to consider what kind of animals these are - JPG and RAW photo formats, what they affect and when you should pay attention to them. What is the photo size and file weight, how they are measured and what they depend on.
Almost all photo cameras can save photos in JPG format (even phone and tablet cameras). In all SLR and non-SLR cameras, as well as in advanced compacts, in addition to JPG, there is at least RAW and RAW +, and sometimes TIFF.
To deal with the formats, first you need to agree on what is meant by the concepts of "size" of a photo and "weight" of a file (photo). I propose to consider these concepts on more tangible objects ... for example, on goodies.
1 | What is a pixel:
The size of objects is measured in meters, the size of a photo is measured in pixels (px).
If you measure the size of this vase with berries, then it will be about 10 centimeters high and 13 centimeters wide ... approximately. That is, we are accustomed to measuring objects in centimeters (meters, kilometers, and so on). If we talk about the photo of the same vase, then the original size of the photo is 7360 pixels (px) wide by 4912 pixels (px) high. This is the maximum photo size my Nikon camera is capable of. To place this photo on the site, the size of the photo is reduced to 1200px by 798px (why, I'll tell you a little later).
What is a pixel? Photographs taken with digital cameras or digitized on a scanner are a combination of tiny colored squares - pixels. If you zoom in on any photo, you will see these pixels. The more such pixels in the photo, the more detailed the picture.
A fragment of the photo magnified a thousand times - squares of pixels are visible.
2 | Is it possible to convert pixels to centimeters:
This is exactly what happens when you need to print photos on paper. One more indicator is needed here - the pixel density (resolution) that the printer (or other photo printing machine) can print. The printing standard for photographs is 300 dpi (dpi is the number of dots per inch). For example, for printing in beautiful glossy magazines, photos with a resolution of 300 dpi are used.
So that you do not puzzle over dividing the photo size by resolution and do not convert inches to centimeters, any photo viewing and editing program (for example, Photoshop) has a function to view the size of the photo image in centimeters. You will need it to understand what is the maximum size of a photo in good quality (with a resolution of 300 dpi) that you can print on paper or other material.
For example, this photo of Frangipani tropical flowers can be printed in the size of 61 cm by 32 cm.
Photo size in pixels and centimeters in Photoshop
To find out the size of a photo in pixels and centimeters in Photoshop, you need to press the key combination Alt + Ctrl + I or go to the menu Image (Image) Image size (Image size).
Let's get back to the reality of digital photos - to pixels and photo sizes in pixels. What happens if you reduce the number of pixels in a photo? The answer is that the quality of the photo will deteriorate. For example, I took the photo of the same bowl of berries at the beginning of the article and reduced the size of the photo to 150 pixels wide. With such a decrease, the program destroys some of the pixels. The photo has become miniature:
Now let's try to "stretch" the photo to the entire page:
Stretched picture looks blurry and fuzzy
As you can see, the detail is not the same, since some of the pixels (and details along with them) are missing.
Of course, if you use this thumbnail as a small icon or a small image in a Power Point presentation, it will look quite normal, but for printing in a half-page magazine it is clearly not suitable.
3 | What photo size (how many pixels) is optimal:
If you plan to someday print a photo, then save photos in the highest possible resolution, which only your camera will allow (carefully study the instructions for your camera to correctly adjust the photo size).
In some cases, you need to reduce the size of photos. As I wrote above, for the site, I reduce the photo size to 1200 pixels on the long side. If you upload a photo to full size, the pages of the site will take a very long time to load, and many visitors may not like this (not to mention Google and Yandex search engines).
The size of photos is measured in pixels (px). The size of the photo on the monitor screens depends on the number of pixels, and what size the photo can be printed.
4 | File size or "photo weight":
Now let's deal with the "weight of the photo". It so happened historically that there is a lot of confusion in this matter and the file size is quite often called the "photo weight", which is more convenient than correct. File sizes are measured in megabytes (MB) or kilobytes (KB). And here it is worth remembering that, unlike kilograms, where 1 kg = 1000g, 1 megabyte = 1024 kilobytes.
How it looks in practice: imagine the situation that your camera has a memory card that says 64GB (gigabyte). If you look at how many exactly these bytes are there (select "properties" on the computer with the right mouse button), it turns out that there are 63567953920 bytes on this memory card and this is equal to 59.2 GB. How big your camera creates files will determine how many photos will fit on that memory card. For example, I have 830 files with photos in RAW format (read about formats below).
What determines the file size:
- Firstly, on the size of the photo (what is measured in pixels): the file with the first photo of the berries (photo size 7360x4912 px) is 5.2 MB, and it, reduced to 150 px, will "weigh" 75.7 KB (in 69 times less).
- Secondly, from the format (JPG, TIFF, RAW), which you can read about below.
- Thirdly, the file size (or "photo weight") depends on the number of details: the more details, the "heavier" the photo (which is most relevant for the JPG format).
Lots of details - more photo weight
For example, in this photo with monkeys from Sri Lanka, there are many small clear (in the language of photographers, "sharp") details and the file size with this photo is 19.7MB, which is significantly larger than berries in a vase on a white background (5.2MB).
If you ask what size photo I can print from a 2MB photo. No one can answer you until they know the number of pixels. And it’s better, of course, to also look at the photo, since some craftsmen like to get a photo from the depths of the Internet, increase the number of pixels programmatically, and then want to print it on the cover of a magazine. It turns out as in the example above with a stretched photo of a vase 150 px wide.
File size (often referred to as "photo weight") is measured in megabytes (MB) or kilobytes (KB) and depends on the format, pixel size, and detail of the photo.
5 | Photo formats:
And, finally, we come to the issue of image formats and the type of file compression, which also determine the size of the photo file.
Almost all photo cameras can save photos in JPG format(even the cameras of phones and tablets). This is the most common image format and is "understood" by all computers and image viewers. In JPG format, photos can be uploaded to social network, post on a blog, add to Word, Power Point files, and so on. JPG can be processed in Photoshop, Lightroom and other image editing programs.
From my practice: if I want to take a photo for a social network and quickly upload it, then I either take a picture on my phone or put the jpg file format in my camera.
The thing to remember about jpg format is that it is a compressed format and it has compression levels. The higher the compression ratio, the smaller the file size by reducing the detail and quality of the photo. Therefore, multiple editing and re-saving (re-compression) of the same photo in jpg format is not recommended.
When saving a file in jpg format, the compression level is selected (example from Photoshop).
In all SLR and non-SLR cameras, as well as in advanced compacts, in addition to JPG, there is at least RAW, and often also TIFF.
A little theory:
- TIFF(Eng. Tagged Image File Format) - a format for storing raster graphic images(including photos). TIFF has become a popular format for storing high-color images. It is used in printing, widely supported by graphic applications.
- RAW(eng. raw - raw, unprocessed) - a digital photograph format containing raw data received from a photomatrix (the thing that is in digital cameras film has been replaced).
Personally, I never photograph in TIFF format. I can’t even think of why I need this if there is RAW. I can use uncompressed TIFF to save photos that I still plan to finalize in Photoshop.
6 | Advantages and disadvantages of the RAW format:
I almost always have a RAW format in my camera, since I'm going to process (edit) photos in Lightroom or Photoshop. RAW has a number of significant disadvantages:
- There is no way to view files without prior conversion. That is, to view photos in RAW format, you need a special program that supports this image format.
- Larger file size than when saving in JPEG (from my Nikon D800 camera, the file size with a photo in RAW format is 74-77 MB). This means fewer photos will fit on the flash drive.
- RAW cannot be uploaded to social networks, a blog, and sometimes even sent by mail. First, RAW needs to be converted with a RAW converter (eg Adobe Camera Raw) that supports the file type of your camera model.
Why do professional photographers often prefer RAW over JPG? Because RAW:
Save this article on Pinterest- gives more options for image correction: white balance, contrast, saturation, brightness and noise level,
- allow you to more accurately correct images without the appearance of defects,
- allows fine correction of lens imperfections (vignetting, chromatic aberration).
So, if you plan to carefully process pictures in Photoshop or Lightroom, subtly feeling "artifacts" and halftones, "overexposure" and "dips" in the shadows, then shoot in RAW. Just remember that in order to get a good result, you will need to understand the settings and operation of RAW converters. Consider if you need this headache? Maybe you should shoot in JPG and devote more time to rest, and not to the computer?