This short article was created by Kenn Guilstorf, chat application for service Escalation Engineer.

You are watching: How much ram does skype use

As one escalation engineer, I assist customers with few of the much more "persnickety" skype for service issues. Lately, I"ve received fairly a couple of cases that are "performance-based" – basically, complaints the Skype for service is slow-moving or sluggish, won"t allow application sharing, or is just using too lot memory. Countless times, an investigation right into these situations shows that the user has let chat application for business run because that weeks; and, over time, the memory has crept up until it influence performance. I"ve even noticed that myself once I permit Skype operation for a lengthy time. So, what is chat application doing, and also why is the holding so much memory? (Here"s a small hint: This is normal and also by design. Nothing is not correct – any and every aboriginal program runs into this.)

How much memory can it chew through?

The an initial step to fix any type of issue is to recognize the problem, and also the an initial step to understanding any kind of problem is to specify it. This isn"t as easy to do as the sounds.

When chat application for service (SfB) first starts, memory intake is comparably tiny (if you have the right to count 100 MB as small). We deserve to see this occur in any variety of tools, such as Task Manager:


Figure 1: Don"t it is in fooled: Lync.exe is the process name because that SfB (32-bit version)

Over time, the amount of memory the the process uses is going to grow. How big it grows will be identified by just how much chat application is used, what that is provided for, and so on. As an example, here"s the same client after around 24 hours:


Figure 2: The exact same SfB 24 hours later

So, Skype has consumed around 32 MB in 24 hours. That isn"t much, right? It yes, really isn"t – until I describe that skype was just sitting idle for every those 24 hours. Basically, I started Skype for organization on a computer, locked it, and also waited around 24 hours before unlocking it. In use, the toll would have actually been much greater – especially if ns joined meetings, used application sharing or desktop computer sharing in those meetings, supplied IM, and also so on. I"ve seen instances in which chat application for business memory intake grew come 300–500 MB in a solitary day. Things can acquire dicey after ~ one or more weeks of consumption – particularly on the far more memory-constrained 32-bit client.

Show me the memory

There are countless tools that deserve to profile memory. Among the most renowned – at least at – is the SysInternals device VMMap, available at VMMap v3.26. We can use it come look in ~ the process memory, and also see even if it is we deserve to profile the skype for business memory.

After you"ve downloaded VMMap, run it. Together it starts, it will open up a procedure list so the you can select the procedure that you want to examine. I"ll pick lync.exe and also click OK.


Figure 3: VMMap in ~ Start

Next, you check out a graphic tha"s a multi-colored depiction of the existing memory profile for the executable the you"ve selected – Lync.exe, in this case.


Figure 4: beginning VMMap for freshly started Lync.exe

There"s much information here, and describing that all would certainly fill increase one or much more blog articles of that own. If you"re interested, there room several good books and also online articles that can aid explain it. (Personally, i recommend "Advanced Windows" through Jeffrey Richter – right now out that print however still excellent in explaining exactly how memory works. You can uncover used duplicates of that at her favorite publication store.)

As you deserve to see, the memory displayed in Task Manager doesn"t align with any category in VMMap. Task Manager is a much more generalized representation; it"s accurate, it just doesn"t counting everything. VMMap is much an ext comprehensive.

Here"s our Skype circumstances after the 24-hour wait period:


Figure 5: VMMap because that Skype ~ 24-hours

Where"s the memory?

If you compare each separation, personal, instance category, nothing really lines up. In reality finding what is consuming the storage is challenging to do due to the fact that the category of storage fluctuate together objects and memory requests are made and released, and also memory gets reserved and also committed because that storing various objects. The "kernel the knowledge" (for the objectives of this blog, anyway) is the "Free" category. In ours example, "free" memory is every the available an are that"s "reserved" for the Lync executable. However only a certain type of "committed" memory is presented in Task Manager. The scheduled memory isn"t counted since it isn"t in use.

So, where"s the memory? the becomes daunting to pinpoint since the storage isn"t lost. Contradictory to famous belief, the skype team was not subsidized by desktop computer memory manufacturers. There is no nefarious plot to obtain customers come upgrade any systems or memory. This isn"t even a situation of plan obsolescence. The fact is a bit more challenging to explain.

Let"s backtrack a bit to make things clearer. When you an initial start the skype for service client, it has actually a relatively small storage footprint – typically 100 MB or so, depending on the variety of contacts its keeping track of for you and other overhead (you can clearly see this in the data above). After a few days, you"ll an alert that this footprint grows numerous hundred thousand bytes to number of megabytes. In details situations, this deserve to be a problem – however it isn"t necessarily a problem in skype for business itself. Rather, it"s an effect of the windows programming paradigm and also how the handles memory natively.

Windows programming what?

I"m only going to offer a simplistic see of home windows memory here. Home windows memory is taken on through high-quality (in state of computer system cycles and also resources) procedures recognized as allocations and de-allocations. As soon as a program demands memory, it asks home windows to clues it. As soon as it"s v with the memory, the routine asks windows to de-allocate it. Internally, home windows goes with several procedures to control the storage requests.

When a request is made, windows checks the memory the it has already committed come the procedure but the the process isn"t using. Windows is feather to see whether there"s a big enough memory block to use. If there is, the system uses it and also goes on its merry way. If there isn"t, it climate checks scheduled memory. If there"s a big enough block of reserved memory, that commits it (in operation system-defined chunks well-known as "pages"), and also stores the change in it. The memory is now committed, and we"ve simply grown the storage footprint the the executable.

What happens if there isn"t enough reserved storage to take care of the request? The operating device tries to reserve more memory – if it can. Here"s wherein the difference between 32-bit architecture and also 64-bit design comes into play. A 32-bit procedure can use just a maximum of 4 GB that memory. This is because 4 GB is the maximum amount that a 32-bit register have the right to address. (A bit have the right to only hold a 1 or a 0 – binary. Therefore, 32 bits method that 232 is the highest attend to that"s allowed). Many thanks to 32-bit architecture, only around 2 GB of that memory is assigned come the procedure itself, the remainder being offered by the operating system to map usual DLLs, take care of typical kernel-mode objects, and also so on. In a 64-bit system, the 64-bit lengthy registers deserve to handle 264, which transforms out come be about 18 exabytes. However, windows artificially boundaries the quantity of memory that"s accessible to be booked to between 2 terabytes and 4 terabytes (TB), depending on the windows version.

After storage is reserved, that will gain committed and also then used as before. The de-allocation procedure is largely the reverse - other than for one or two tiny but crucial details.

First, uneven requested, Windows never "clears" memory. When memory is de-allocated, the is significant as free in the windows memory map. Everything it held is still there and will remain there till it"s overwritten by an additional allocation. Next, Windows seldom de-commits memory unless asked for to carry out so. Together I claimed earlier, storage operations are relatively resource-expensive. So, if a program required the memory allocated previously, windows is assumes the it might need that memory again and will organize off de-committing the memory until it absolutely has actually to. Finally, Windows never "coalesces" memory. This way that storage that home windows frees is never ever "aggregated," and also blocks of complimentary memory are never ever "moved together" to make larger blocks of totally free memory. (All these attributes are lumped together into a classification that"s well-known as "garbage collection." .NET framework famously does have some garbage collection features. However, skype for business is a "native" or non-.NET application.)

Skype for service processes numerous objects every second that room variably sized. It has to do this in order to be the stunning device that we want it come be. We ask it to regulate contacts, manage calendars (meetings), IM through our friends, relatives, and colleagues and also even speak come them by utilizing both voice and video, re-superstructure desktops or windows, and also so on. Well, come quote the late, good Robert Heinlein, amongst others: "There is no such point as a free lunch."

Managing so numerous objects of such differing and often variable sizes creates allocations and also de-allocations the variably sized chunks the memory. End time, this reasons memory fragmentation – in ~ times major – that boosts the memory footprint the Skype for Business.

An instance might far better illustrate this point. Let"s assume that Skype (or any kind of native program, really) allocates 64 objects, numbered 1-64, that room 4 K bytes every in size:


Figure 6: 64 Objects, each making use of 4 KB of memory

This reasons a 256-KB memory allocation and also commitment. Now, let"s assume the the regime doesn"t call for the even-numbered objects, so that releases them:


Figure 7: Releasing every the even-numbered objects frees increase 128 KB that memory!

If friend look at the larger photo of as whole memory (by using VMMap or a similar tool), you"ll see that among the cursed columns (likely in the Heap section, however it counts on specifically how the program requested the memory) has actually 128 KB less, and also the Free section has grown by 128 KB. In job Manager, the program currently owns only 128 KB bytes that memory.

Let"s next assume the our program has a single 8-KB object that it has to store. This need to be simple. After ~ all, it has 128 KB free. However, trying to keep that 8-KB thing will produce a brand-new memory reservation rather of save the storage in the 128-KB cost-free space. This is because, if girlfriend look in ~ the memory, you can see that it"s tho segmented into 4-KB chunks! windows doesn"t have actually a large enough storage block to host the 8-KB object, for this reason it has to reserve and also commit an ext memory come the program.

This is a quite contrived example, yet it illustrates the an obstacle of Skype"s storage management. Chat application manages a huge number of objects that don"t have an quickly definable size. These objects room all variably lengthed. This way that together objects room stored and freed – particularly over a long period of time, such as days or main – the storage fragmentation can come to be severe and, since Windows needs to allocate much more memory because that storing the brand-new objects, the memory footprint grow excessively.

When this causes issues in the 32-bit client, we frequently suggest relocating to the 64-bit customer because storage is much less constrained there, thanks to 64-bit vs 32-bit architecture. However, excessive memory growth, among other considerations, can reason sluggishness in even the 64-bit client. Those other considerations include as whole system memory, disk speeds (because program memory is generally backed by digital memory in the home windows paging file), how many other applications are open, and so on. In both cases, as the skype for business memory footprint grows over time, the worse it"s going come perform. In the 32-bit customer case, this can reason the larger objects the Skype calls for – such as its interior buffer for applications sharing – to operation out of an are and cause failures.

To it is in fair, memory is only one source that is consumed in time – but it is the most obvious. Handle intake can grow, subject will rise over time, paged-pool memory will certainly increase, and also so on. Every of these increases can have an impact on the procedure and, in details cases, top top the entire operating system. This is just one of the myriad reasons why we suggest – even for the 64-bit customer – that customers exit and also restart Skype daily (or, in ~ least, weekly) together a ideal practice.

What execute I do about this, and can I force Skype come restart?

There space several ways to force a chat application restart, yet there is no single, finest way. One way, of course, is user education. Users space the arbiters the their desktop computer usage in most cases, for this reason it"s pragmatic to teach castle to sign out and also close Skype when they leaving for the day. This can also be done as a mandatory action by composing a custom script or executable, and also then running either one as a job Scheduler task. That strategy is a little ham-fisted, and can cause Skype to cycle also when it"s "in use" (although this have the right to be mitigated somewhat through job Scheduler conditions). There are likewise third-party opportunities for desktop computer and computer system management, potential BIOS options, and so on.

See more: How Were The French Revolution And American Revolution Different Brainly

The bottom line is that it"s ideal for skype for company to bike it daily – or, in ~ least, weekly. If you deserve to train your users to recycle chat application for company on a regular basis – or, in ~ least, once things get weird – you"ll likely have a lot under Helpdesk calls and many much more happy users.